我想运行一个区块链应用程序,但是出现了这个错误。
npm错误!代码ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3安装:node-gyp rebuild
npm ERR!退出状态1
npm ERR!
npm ERR! scrypt@6.0.3安装脚本失败。
npm ERR! npm可能不是问题。
上面可能还有其他日志记录输出。
我尝试删除node_modules,npm
缓存验证并再次删除npm install
。我已经卸载并重新安装了npm
和nodejs
。我的npm
版本是6.12.0
和node
版本v12.13.0
答案 0 :(得分:0)
https://github.com/ethereum/web3.js/issues/1066#issuecomment-338841841
通过此链接:
我已通过以下步骤解决了此问题
npm install --global --production windows-build-tools
node-gyp configure --msvs_version=2015
npm config set python /path/to/executable/python2.7
npm install web3 --save
而且,我认为您可以按照以下步骤修复node-gyp:
答案 1 :(得分:0)
命令行开发人员工具需要重新编译:
macOS
https://developer.apple.com/downloads/index.action 下载“用于Xcode 11的命令行工具” 在安装过程中,系统会要求您输入Apple Developer登录名。
Ubuntu
$ sudo apt-get install build-essential
Windows 10
$ npm install -g windows-build-tools
答案 2 :(得分:0)
信不信由你, 使用:sudo npm ... 它对我有用