electron-builder出错问题解决

electron-builder出错问题解决


在rebuilding native production dependencies 的时候出错
具体错误如下:

Error: /Users/root/.nvm/versions/node/v10.0.0/bin/node exited with code 6
Output:

> [email protected] install /Users/root/Documents/myProject/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library


Error output:
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp ERR! Completion callback never invoked! 
node-pre-gyp ERR! System Darwin 16.7.0
node-pre-gyp ERR! command "/Users/root/.nvm/versions/node/v10.0.0/bin/node" "/Users/rootDocuments/myProject/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/root/Documents/myProject/node_modules/grpc
node-pre-gyp ERR! node -v v10.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!     
npm ERR! code ELIFECYCLE
npm ERR! errno 6
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 6
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

解决方法:sudo npm install -g node-gyp
实测好用,不过不知道哪里不对,第二次运行又不好用了,得重新再执行一遍上述命令,在idea里面执行的命令,搞不太清楚,不知道是不是需要重启一下。mark一下。

你可能感兴趣的:(nodejs)