【问题标题】:npm install error: sqlite never downloadsnpm 安装错误:sqlite 从不下载
【发布时间】:2020-08-23 08:26:38
【问题描述】:

在运行npm install 下载项目依赖项时,sqlite3 遇到错误并且永远不会安装。尝试npm install sqlite3 会产生同样的错误。

在 ChromeOS 上的 Linux Beta (Debian v10 buster) 上运行。

在别人的机器上安装得很好。预计它与 ChromeOS 有关。

项目文件链接:https://github.com/andrewbruner/fsjs-techdegree-unit-09

 andrewbruner@penguin:~/treehouse/fsjs-techdegree-unit-09$ npm install

 > sqlite3@4.0.6 install /home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/sqlite3
 > node-pre-gyp install --fallback-to-build

 node-pre-gyp WARN Using request for node-pre-gyp https download 
 node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.6/node-v72-linux-x64.tar.gz 
 node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.6 and node@12.16.3 (node-v72 ABI, glibc) (falling back to source compile with node-gyp) 
 gyp ERR! build error 
 gyp ERR! stack Error: not found: make
 gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
 gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
 gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
 gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
 gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
 gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
 gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:167:21)
 gyp ERR! System Linux 4.19.98-08076-g24ab33fb8e14
 gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/sqlite3/lib/binding/node-v72-linux-x64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
 gyp ERR! cwd /home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/sqlite3
 gyp ERR! node -v v12.16.3
 gyp ERR! node-gyp -v v5.1.0
 gyp ERR! not ok 
 node-pre-gyp ERR! build error 
 node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/sqlite3/lib/binding/node-v72-linux-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
 node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
 node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
 node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
 node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
 node-pre-gyp ERR! System Linux 4.19.98-08076-g24ab33fb8e14
 node-pre-gyp ERR! command "/usr/bin/node" "/home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
 node-pre-gyp ERR! cwd /home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/sqlite3
 node-pre-gyp ERR! node -v v12.16.3
 node-pre-gyp ERR! node-pre-gyp -v v0.11.0
 node-pre-gyp ERR! not ok 
 Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/andrewbruner/treehouse/fsjs-techdegree-unit-09/node_modules/sqlite3/lib/binding/node-v72-linux-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
 npm WARN techdegree-fullstackjs-rest-api@1.0.0 No repository field.
 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

 npm ERR! code ELIFECYCLE
 npm ERR! errno 1
 npm ERR! sqlite3@4.0.6 install: `node-pre-gyp install --fallback-to-build`
 npm ERR! Exit status 1
 npm ERR! 
 npm ERR! Failed at the sqlite3@4.0.6 install script.
 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

 npm ERR! A complete log of this run can be found in:
 npm ERR!     /home/andrewbruner/.npm/_logs/2020-05-07T18_52_06_591Z-debug.log

【问题讨论】:

    标签: linux sqlite npm-install chromebook node-pre-gyp


    【解决方案1】:

    npm 无法下载预构建的二进制文件,因此回退到使用 node-gyp 构建它。这就是构建失败的地方。

    注意日志中的行:gyp ERR! stack Error: not found: make

    好像您没有安装make。由于您使用的是 Debian,您应该能够通过运行:sudo apt-get install build-essential 来安装 make。

    这个问题已经在以下问题中广泛讨论过:npm failed to install time with make not found error

    请务必仔细查看错误消息 :)

    【讨论】:

      猜你喜欢
      • 2013-02-08
      • 2023-03-30
      • 2012-02-09
      • 2022-01-10
      • 2016-04-03
      • 1970-01-01
      • 1970-01-01
      • 2014-11-21
      相关资源
      最近更新 更多