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

Windows npm install一直报错 #8

Open
himaha opened this issue Jul 8, 2020 · 2 comments
Open

Windows npm install一直报错 #8

himaha opened this issue Jul 8, 2020 · 2 comments

Comments

@himaha
Copy link

himaha commented Jul 8, 2020

D:\program\DouyuBarrage-Pro\dybarrage-server>npm install

[email protected] install D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\nodejieba
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/yanyiwu/nodejieba/releases/download/2.4.0/nodejieba-v2.4.0-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)
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn D:\����\visual studio\MSBuild\Current\Bin\MSBuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
gyp ERR! stack at onErrorNT (internal/child_process.js:469:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\nodejieba\build\Release\nodejieba.node" "--module_name=nodejieba" "--module_path=D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\nodejieba\build\Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\nodejieba
gyp ERR! node -v v12.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! This is a bug in node-gyp.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com/nodejs/node-gyp/issues
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'D:\nodejs\node.exe D:\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\nodejieba\build\Release\nodejieba.node --module_name=nodejieba --module_path=D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\nodejieba\build\Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (7)
node-pre-gyp ERR! stack at ChildProcess. (D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.17763
node-pre-gyp ERR! command "D:\nodejs\node.exe" "D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\nodejieba
node-pre-gyp ERR! node -v v12.18.2
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute 'D:\nodejs\node.exe D:\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\nodejieba\build\Release\nodejieba.node --module_name=nodejieba --module_path=D:\program\DouyuBarrage-Pro\dybarrage-server\node_modules\nodejieba\build\Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (7)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

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! D:\nodejs\node_cache_logs\2020-07-08T07_25_29_771Z-debug.log

@Crawler995
Copy link
Owner

@himaha 的确,很多人出错都出在node-pre-gyp这个包的安装上。这个包是用来做“词云”的node-jieba(用于中文分词)的依赖包。node-jieba并不是简单的nodejs包,为了保证运行速度,其底层是使用C++编写的,这就导致想要安装它需要额外的C++环境依赖。你可以在搜索引擎搜索“node-pre-gyp安装错误”,有一些解决方案,可以试试。

@himaha
Copy link
Author

himaha commented Jul 8, 2020

@himaha 的确,很多人出错都出在node-pre-gyp这个包的安装上。这个包是用来做“词云”的node-jieba(用于中文分词)的依赖包。node-jieba并不是简单的nodejs包,为了保证运行速度,其底层是使用C++编写的,这就导致想要安装它需要额外的C++环境依赖。你可以在搜索引擎搜索“node-pre-gyp安装错误”,有一些解决方案,可以试试。

好的感谢

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

No branches or pull requests

2 participants