Skip to content
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

Closed
sqchenxiyuan opened this issue Oct 16, 2016 · 5 comments
Closed

win10 npm安装报错 #70

sqchenxiyuan opened this issue Oct 16, 2016 · 5 comments
Labels

Comments

@sqchenxiyuan
Copy link

环境:WIN10 NODE:V4.4.7
执行 npm install nodejieba -g 出错

C:\WINDOWS\system32>npm install nodejieba -g --registry=http://registry.npm.taobao.org
|

nodejieba@2.2.3 install C:\Program Files\nodejs\node_global\node_modules\nodejieba
node-gyp rebuild

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: 1
gyp 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

@sqchenxiyuan
Copy link
Author

。。忘了安装 node-gyp了,,,,安了就好了

@tingXia-maker
Copy link

node 10版本似乎下载不了呢

@xunxun10
Copy link

xunxun10 commented Jul 5, 2023

node版本影响很大,试了 18和17版本都有问题,折腾了好久,最后换16.20.1解决了

@imnxg
Copy link

imnxg commented Dec 13, 2023

能否兼容Node18以上版本

@acengtb
Copy link

acengtb commented Apr 17, 2024

环境:win10 node 20.10.0
安装失败,好遗憾~
默认安装的是 nodejieba 2.6.0 版本,但是官方最新的才 2.5.2,于是 npm i nodejieba@2.5.2 还是不行,
node install node-gyp node-pre-gyp 之后重新安装,也还是报错:
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'D:\nodejs\node.exe D:\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=M:\nodejs\myMall\kemall\node_modules\nodejieba\build\Release\nodejieba.node --module_name=nodejieba --module_path=M:\nodejs\myMall\kemall\node_modules\nodejieba\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115 --python=python3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.11
npm ERR! node-pre-gyp info using node@20.10.0 | win32 | x64
npm ERR! node-pre-gyp info check checked for "M:\nodejs\myMall\kemall\node_modules\nodejieba\build\Release\nodejieba.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/yanyiwu/nodejieba/releases/download/v2.5.2/nodejieba-v2.5.2-node-v115-win32-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/yanyiwu/nodejieba/releases/download/v2.5.2/nodejieba-v2.5.2-node-v115-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for nodejieba@2.5.2 and node@20.10.0 (node-v115 ABI, unknown) (falling back to source compile
with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/yanyiwu/nodejieba/releases/download/v2.5.2/nodejieba-v2.5.2-node-v115-win32-x64.tar.gz

npm ERR! gyp ERR! node-gyp -v v10.0.1

npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants