node.js - npm 安装失败
问题描述
克隆此 repo https://github.com/jainsamyak/Stockifier.git后尝试 npm install 失败。无法找到任何解决方案。以下是终端中的摘要:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
26 warnings and 20 errors generated.
make: *** [Release/obj.target/node_sqlite3/src/database.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/apple/Documents/Projects/Stockifier/node_modules/sqlite3/lib/binding/node-v83-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/apple/Documents/Projects/Stockifier/node_modules/sqlite3/lib/binding/node-v83-darwin-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /Users/apple/Documents/Projects/Stockifier/node_modules/sqlite3
gyp ERR! node -v v14.16.0
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/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/apple/Documents/Projects/Stockifier/node_modules/sqlite3/lib/binding/node-v83-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/apple/Documents/Projects/Stockifier/node_modules/sqlite3/lib/binding/node-v83-darwin-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/apple/Documents/Projects/Stockifier/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Darwin 19.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/apple/Documents/Projects/Stockifier/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/apple/Documents/Projects/Stockifier/node_modules/sqlite3
node-pre-gyp ERR! node -v v14.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/apple/Documents/Projects/Stockifier/node_modules/sqlite3/lib/binding/node-v83-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/apple/Documents/Projects/Stockifier/node_modules/sqlite3/lib/binding/node-v83-darwin-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
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! /Users/apple/.npm/_logs/2021-04-06T10_12_32_493Z-debug.log
解决方案
推荐阅读
- symfony - 如何使用 PHP 和 Symfony 设置 cookie?
- c++ - C++ — `algorithm` 库和命名空间 `std`
- python - Python为什么要导入内置
- javascript - JavaScript/Node js 导入导出模块(在 JavaScript 文件中使用导出的 node Js 模块)
- php - 使用 Lumen/Laravel 在微服务架构中的应用程序之间进行数据交换
- python - 如何避免无限的本地错误来创建大字符串?
- c# - 将 JSON 对象反序列化为 C# 对象映射
- prestashop - 如何更改时事通讯 prestashop 中的占位符?
- jquery - How to fix a custom range slider progress not following input range thumb?
- freepascal - Rotate Function for Component Drawed with Canvas Lazarus