我一直在努力安装这个模块超过两天,我无法做到。能不能让我知道我错过了哪一步?
https://github.com/swillner/netcdf4-js
以下是我在nodejs上遇到的错误:
D:\master\nodeTut>npm install netcdf4
netcdf4@0.3.1 install D:\master\nodeTut\node_modules\netcdf4
node-gyp rebuild
D:\master\nodeTut\node_modules\netcdf4>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 )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
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 D:\master\nodeTut\node_modules\netcdf4
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'D:\master\nodeTut\package.json'
npm WARN nodeTut No description
npm WARN nodeTut No repository field.
npm WARN nodeTut No README data
npm WARN nodeTut No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! netcdf4@0.3.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the netcdf4@0.3.1 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\Ehsan\AppData\Roaming\npm-cache_logs\2018-06-11T22_02_31_364Z-debug.log
答案 0 :(得分:0)
尝试安装此软件包,看看它是否解决了问题
npm install --global --production windows-build-tools