无法在Windows 10上安装web3

时间:2018-03-11 17:57:18

标签: node.js npm ethereum web3

我关注了此页面上的所有内容:

https://medium.com/@PrateeshNanada/steps-to-install-testrpc-in-windows-10-96989a6cd594

除了第5步,我的Node.js版本是8.10.0而不是8.10.2,我认为这不是一个很大的区别。

我已经安装了VS 2017 Community Edition,Windows 10 SDK,OpenSSL,npm-gyp。 我运行了命令npm install --global --production windows-build-tools来安装所有最新的构建工具,但仍然出现此错误。需要帮助。

    npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz@1.0.7: ⚠️  WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar

> scrypt@6.0.3 preinstall C:\Windows\System32\node_modules\scrypt
> node node-scrypt-preinstall.js


> scrypt@6.0.3 install C:\Windows\System32\node_modules\scrypt
> node-gyp rebuild


C:\Windows\System32\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
C:\Windows\System32\node_modules\scrypt\build\..\scrypt\win\include\config.h
MSBUILD : error MSB1009: Project file does not exist.
Switch: build/binding.sln
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Windows\System32\node_modules\scrypt
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\System32\package.json'
npm WARN System32 No description
npm WARN System32 No repository field.
npm WARN System32 No README data
npm WARN System32 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt@6.0.3 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:
npm ERR!     C:\Users\Syed\AppData\Roaming\npm-cache\_logs\2018-03-11T17_47_58_702Z-debug.log

在我看来,我的机器上的node-gyp重建失败了。那是为什么?

1 个答案:

答案 0 :(得分:0)

您是否尝试运行命令 npm install --global --production windows-build-tools 在PowerShell中?

我遇到了同样的问题,并且在Powershell中运行了命令。