首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >node-pre-gyp install --回退到构建错误在OSX上使用npm进行安装

node-pre-gyp install --回退到构建错误在OSX上使用npm进行安装
EN

Stack Overflow用户
提问于 2015-02-19 12:16:02
回答 5查看 7.3K关注 0票数 3

在OSX上运行,节点版本0.12.0,运行

代码语言:javascript
复制
npm install --production

对于试图安装sqlite3 v3.0.4的Ghost,我得到以下错误:

代码语言:javascript
复制
> node-pre-gyp install --fallback-to-build

child_process: customFds option is deprecated, use stdio instead. gyp: /Users/USER/.node/common.gypi not found (cwd:
/Users/USER/Documents/personal_website/ghost/node_modules/sqlite3) while reading includes of binding.gyp while trying to load binding.gyp gyp 
ERR! configure error  gyp 
ERR! stack Error: `gyp` failed with exit code: 1 gyp 
ERR! stack     at ChildProcess.onCpExit
(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16) gyp ERR! stack     at ChildProcess.emit (events.js:110:17) gyp ERR! stack     at
Process.ChildProcess._handle.onexit (child_process.js:1067:12) gyp     

ERR! System Darwin 14.1.0 gyp ERR! command "node"
"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--name=sqlite3" "--configuration=Release" "--module_name=node_sqlite3" "--version=3.0.4" "--major=3" "--patch=4" "--runtime=node" "--node_abi=node-v14" "--platform=darwin" "--target_platform=darwin" "--arch=x64" "--target_arch=x64" "--module_main=./lib/sqlite3" "--host=https://mapbox-node-binary.s3.amazonaws.com/" "--module_path=/Users/USER/Documents/personal_website/ghost/node_modules/sqlite3/lib/binding/node-v14-darwin-x64" "--module=/Users/USER/Documents/personal_website/ghost/node_modules/sqlite3/lib/binding/node-v14-darwin-x64/node_sqlite3.node" "--remote_path=./sqlite3/v3.0.4/" "--package_name=node-v14-darwin-x64.tar.gz" "--staged_tarball=build/stage/sqlite3/v3.0.4/node-v14-darwin-x64.tar.gz" "--hosted_path=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.4/" "--hosted_tarball=https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.0.4/node-v14-darwin-x64.tar.gz" "--nodedir=/Users/USER/.node" gyp 
ERR! cwd /Users/USER/Documents/personal_website/ghost/node_modules/sqlite3 gyp 

ERR! node -v v0.12.0 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok

npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--production"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! sqlite3@3.0.4 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sqlite3@3.0.4 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls sqlite3
npm ERR! There is likely additional logging output above.

我的路径中确实有/usr/local/share/npm/bin。

EN

回答 5

Stack Overflow用户

发布于 2015-02-20 14:23:12

当我尝试安装ghost的时候,我也得到了这个错误。看起来node-sqlite3出了点问题,因为我看到其他人发布了这个错误。一旦node-sqlite3被修复,可能会有更多的问题:

Ghost目前还不支持节点0.12.x。在README.md中:

Ghost需要节点v0.10.x

https://github.com/TryGhost/Ghost/issues/4240上有更多信息

在ghost发布新版本之前,我可能只会安装一个较旧版本的node。

票数 1
EN

Stack Overflow用户

发布于 2017-03-09 23:49:58

npm i sqlite3 --build-from-source可能会工作

票数 1
EN

Stack Overflow用户

发布于 2015-02-20 22:31:40

我也遇到了这个错误。使用npm版本2.5.1将nodejs降级到0.10.9后,我可以执行npm install --production而不会出错

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28598512

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档