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