【发布时间】:2019-07-11 03:03:18
【问题描述】:
我的 MAC 问题迫使我必须格式化并重新开始。我将我的项目上传到 GITHUB 并在安装 NPM 6.9.0 和 Node 12.6.0 后下载它。没有任何效果,我不断收到这个 gyp 错误:
gyp: Call to 'node findJavaHome.js' returned exit status 1 while in 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:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/anonymous/Development/Mundo1.6/node_modules/java
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! java@0.11.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java@0.11.0 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:
我现在不知道该怎么做...我已经尝试了我在网上看到的所有建议:
sudo npm install --unsafe-perm
sudo node-gyp rebuild -g --unsafe-perm
sudo chmod 777
sudo node-gyp rebuild -g --unsafe-perm
sudo npm config set unsafe-perm=true
npm rebuild node-sass
在这一点上,任何帮助将不胜感激。同样,我必须格式化才能升级我的 MAC os Mojave 10.14.5
过去我从来不需要经常在 NPM 中使用 sudo,所以我不确定出了什么问题。
【问题讨论】:
标签: node.js npm ionic4 node-gyp