npm 无法安装 scrypt。节点gyp重建

Fri*_*eda 5 javascript node.js npm scrypt blockchain

我想运行区块链应用程序,但出现此错误。

npm 错误!代码 ELIFECYCLE
npm ERR!错误号 1
npm 错误号!scrypt@6.0.3 安装:node-gyp rebuild
npm 错误!退出状态 1
npm ERR!
npm 错误!scrypt@6.0.3 安装脚本失败。
npm 错误!这可能不是 npm 的问题。

上面可能有额外的日志输出。

我曾尝试删除 node_modules、npm缓存验证并npm install再次尝试。我已经卸载和重新安装npmnodejs。我的npm版本是6.12.0node版本v12.13.0

can*_*stu 3

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
Run Code Online (Sandbox Code Playgroud)

而且,我认为您可以按照以下步骤修复 node-gyp:

https://github.com/nodejs/node-gyp