New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win10 npm安装报错 #70
Comments
。。忘了安装 node-gyp了,,,,安了就好了 |
node 10版本似乎下载不了呢 |
node版本影响很大,试了 18和17版本都有问题,折腾了好久,最后换16.20.1解决了 |
能否兼容Node18以上版本 |
环境:win10 node 20.10.0 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11 |
环境:WIN10 NODE:V4.4.7
执行 npm install nodejieba -g 出错
C:\WINDOWS\system32>npm install nodejieba -g --registry=http://registry.npm.taobao.org
|
C:\Program Files\nodejs\node_global\node_modules\nodejieba>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
index.cpp
nodejieba.cpp
c:\program files\nodejs\node_global\node_modules\nodejieba\lib\utils.h(4): fatal error C1083: 无法打开包括文件: “node.h”: No su
ch file or directory (编译源文件 ..\lib\nodejieba.cpp) [C:\Program Files\nodejs\node_global\node_modules\nodejieba\build\nod
ejieba.vcxproj]
c:\program files\nodejs\node_global\node_modules\nodejieba\lib\utils.h(4): fatal error C1083: 无法打开包括文件: “node.h”: No su
ch file or directory (编译源文件 ..\lib\index.cpp) [C:\Program Files\nodejs\node_global\node_modules\nodejieba\build\nodejie
ba.vcxproj]
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
failed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
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:\Program Files\nodejs\node_global\node_modules\nodejieba
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "nodejieba" "-g" "--registry=http://registry.npm.taobao.org"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! nodejieba@2.2.3 install:
node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodejieba@2.2.3 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the nodejieba package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nodejieba
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls nodejieba
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\WINDOWS\system32\npm-debug.log
The text was updated successfully, but these errors were encountered: