nodejieba
nodejieba copied to clipboard
Win10 安装不成功,试了好多办法😫
[email protected] install E:\Desktop\Program\Github\RSSHub\node_modules\nodejieba node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/yanyiwu/nodejieba/releases/download/2.4.1/nodejieba-v2.4.1-node-v72-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。
index.cpp
nodejieba.cpp
win_delay_load_hook.cc
C:\Users\10524\AppData\Local\node-gyp\Cache\12.18.3\x64\node.lib : fatal error LNK1106: 文件无效或磁盘已满: 无法查找到 0x2FD008 [E:\Desktop\Program\Github
RSSHub\node_modules\nodejieba\build\nodejieba.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: D:\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\10524\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\10524\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=E:\Desktop\Program\Github\RSSHub\node_modules\nodejieba\build\Release\nodejieba.node" "--module_name=nodejieba" "--module_path=E:\Desktop\Program\Github\RSSHub\node_modules\nodejieba\build\Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd E:\Desktop\Program\Github\RSSHub\node_modules\nodejieba
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\10524\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=E:\Desktop\Program\Github\RSSHub\node_modules\nodejieba\build\Release\nodejieba.node --module_name=nodejieba --module_path=E:\Desktop\Program\Github\RSSHub\node_modules\nodejieba\build\Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\10524\AppData\Roaming\npm-cache_logs\2020-07-26T05_36_18_982Z-debug.log
我也遇到了这个问题,先删除node-gyp缓存:
For future reference, deleting the
node-gyp
cache folder should fix this issue.Path -
C:\Users\[USERNAME]\.node-gyp
orC:\Users\[USERNAME]\AppData\Local\node-gyp
如果还不行,可以重新安装node-gyp(同时确认python安装好了)
重新安装这个包时,使用 npm --build-from-source install
不知道中间步骤哪个有效,反正都做了以后成功了
是不是没有全局安装 node-gyp
?
npm i -g node-gyp@latest
This issue has not been updated for over 3 years and will be marked as stale. If the issue still exists, please comment or update the issue, otherwise it will be closed after 7 days.