hexo-theme-redefine icon indicating copy to clipboard operation
hexo-theme-redefine copied to clipboard

[BUG] npm install [email protected] 安装错误

Open wkk-dev opened this issue 3 months ago • 18 comments

提交 Issue 前检查清单

Bug 描述

Node版本 18/20 hexo 7.1.0 主题版本2.6.1 操作系统 Windows11 Git版本2.44.0

npm install [email protected] 时报错如下 $ npm install [email protected] npm ERR! code 1 npm ERR! path C:\Users\ADMIN\Desktop\redefine\node_modules\nodejieba npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Users\ADMIN\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\ADMIN\Desktop\redefine\node_modules\nodejieba\build\Release\nodejieba.node --module_name=nodejieba --module_path=C:\Users\ADMIN\Desktop\redefine\node_modules\nodejieba\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108’ (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using [email protected] npm ERR! node-pre-gyp info using [email protected] | win32 | x64 npm ERR! node-pre-gyp info check checked for “C:\Users\ADMIN\Desktop\redefine\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-v108-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-v108-win32-x64.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 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-v108-win32-x64.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using [email protected] npm ERR! gyp info using [email protected] | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using [email protected] npm ERR! gyp info using [email protected] | win32 | x64 npm ERR! gyp info find Python using Python version 3.12.1 found at “C:\Python312\python.exe” npm ERR! gyp http GET https://nodejs.org/download/release/v18.19.1/node-v18.19.1-headers.tar.gz npm ERR! gyp WARN install got an error, rolling back install npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.19.1/node-v18.19.1-headers.tar.gz failed, reason: read ECONNRESET npm ERR! gyp ERR! stack at ClientRequest. (C:\Users\ADMIN\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14) npm ERR! gyp ERR! stack at ClientRequest.emit (node:events:517:28) npm ERR! gyp ERR! stack at _destroy (node:_http_client:882:13) npm ERR! gyp ERR! stack at onSocketNT (node:_http_client:902:5) npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:83:21) npm ERR! gyp ERR! System Windows_NT 10.0.22631 npm ERR! gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\ADMIN\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “configure” “–fallback-to-build” “–module=C:\Users\ADMIN\Desktop\redefine\node_modules\nodejieba\build\Release\nodejieba.node” “–module_name=nodejieba” “–module_path=C:\Users\ADMIN\Desktop\redefine\node_modules\nodejieba\build\Release” “–napi_version=9” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v108” npm ERR! gyp ERR! cwd C:\Users\ADMIN\Desktop\redefine\node_modules\nodejieba npm ERR! gyp ERR! node -v v18.19.1 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok npm ERR! node-pre-gyp ERR! build error npm ERR! node-pre-gyp ERR! stack Error: Failed to execute ‘C:\Program Files\nodejs\node.exe C:\Users\ADMIN\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\ADMIN\Desktop\redefine\node_modules\nodejieba\build\Release\nodejieba.node --module_name=nodejieba --module_path=C:\Users\ADMIN\Desktop\redefine\node_modules\nodejieba\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108’ (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess. (C:\Users\ADMIN\Desktop\redefine\node_modules@mapbox\node-pre-gyp\lib\util\compile.js:89:23) npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1098:16) npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:303:5) npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.22631 npm ERR! node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\ADMIN\Desktop\redefine\node_modules@mapbox\node-pre-gyp\bin\node-pre-gyp” “install” “–fallback-to-build” npm ERR! node-pre-gyp ERR! cwd C:\Users\ADMIN\Desktop\redefine\node_modules\nodejieba npm ERR! node-pre-gyp ERR! node -v v18.19.1 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11 npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in: C:\Users\ADMIN\AppData\Local\npm-cache_logs\2024-03-22T14_15_43_681Z-debug-0.log

望作者赶快回复/修复

复现方法

No response

预期结果

No response

截图

Snipaste_2024-03-22_22-22-10 Snipaste_2024-03-22_22-22-25 Snipaste_2024-03-22_22-22-31

电脑操作系统

Windows 11

浏览器

Microsoft Edge

版本

122.0.2365.92 X64 位

移动端设备

Android 13

移动端操作系统

MIUI 14

浏览器

Microsoft Edge

版本

122.0.2365.92

其他

No response

wkk-dev avatar Mar 22 '24 14:03 wkk-dev

尝试使用 npm install [email protected] 安装新版本nodejieba看看

FrederickAsYou avatar Apr 03 '24 13:04 FrederickAsYou

似乎卡在这里了

wwwwwwwwwwwwSnipaste_2024-04-04_17-50-43

wkk-dev avatar Apr 04 '24 09:04 wkk-dev

安装完了吗

FrederickAsYou avatar Apr 04 '24 11:04 FrederickAsYou

我macOS装了2.5.2安装试过了,但是部署的时候报错,就换成了2.6.0

FrederickAsYou avatar Apr 04 '24 11:04 FrederickAsYou

不行啊,还是同样的问题 gpy

wkk-dev avatar Apr 04 '24 12:04 wkk-dev

我之前windows也装不上这玩意儿

FrederickAsYou avatar Apr 04 '24 13:04 FrederickAsYou

nodejieba写的很烂

FrederickAsYou avatar Apr 04 '24 13:04 FrederickAsYou

对了对了,你运行 node -vnpm -v 截图给我看看

FrederickAsYou avatar Apr 04 '24 13:04 FrederickAsYou

look image

wkk-dev avatar Apr 04 '24 14:04 wkk-dev

看起来没啥问题,你去加evan微信问问

me.ohevan.com

FrederickAsYou avatar Apr 04 '24 14:04 FrederickAsYou

image

wkk-dev avatar Apr 04 '24 14:04 wkk-dev

搜索 evanovation

FrederickAsYou avatar Apr 04 '24 14:04 FrederickAsYou

搜索 evanovation

用微信搜啊

FrederickAsYou avatar Apr 04 '24 15:04 FrederickAsYou

o

wkk-dev avatar Apr 05 '24 00:04 wkk-dev

网络问题

EvanNotFound avatar Apr 06 '24 15:04 EvanNotFound

网络问题

但是我Windows之前也是同样的报错,换mac之后为啥就可以装

FrederickAsYou avatar Apr 06 '24 23:04 FrederickAsYou

image

它是指这个问题

wkk-dev avatar Apr 07 '24 02:04 wkk-dev

image

它是指这个问题

666

FrederickAsYou avatar Apr 07 '24 08:04 FrederickAsYou