首页 > 解决方案 > yarn / npm install node-gyp 问题“node-pre-gyp install --fallback-to-build --library=static_library”

问题描述

我在不同的笔记本电脑上克隆了自己的存储库,当我尝试执行“yarn install”或“npm install”时,它会停止并返回一些错误。我研究了很多,试图删除yarn.lock,package-lock,全局安装node-pre-gyp,没有任何效果

产生的错误是:

myPath\node_modules\grpc: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build --library=static_library
Arguments:
Directory: C:\Users\LISANDRO\Desktop\borrar test\rapisuper\node_modules\grpc
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.13.0
node-pre-gyp info using node@14.15.4 | win32 | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "C:\Users\LISANDRO\Desktop\borrar test\rapisuper\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node" (not found)
node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v83-win32-x64-unknown.tar.gz
node-pre-gyp http 404 https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v83-win32-x64-unknown.tar.gz
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v83-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc@1.23.3 and node@14.15.4 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v83-win32-x64-unknown.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@14.15.4 | win32 | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@14.15.4 | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\LISANDRO\AppData\Local\Programs\Python\Python39\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:308:12)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\LISANDRO\\Desktop\\borrar test\\rapisuper\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\LISANDRO\\Desktop\\borrar test\\rapisuper\\node_modules\\grpc\\src\\node\\extension_binary\\node-v83-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\LISANDRO\\Desktop\\borrar test\\rapisuper\\node_modules\\grpc\\src\\node\\extension_binary\\node-v83-win32-x64-unknown" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd C:\Users\LISANDRO\Desktop\borrar test\rapisuper\node_modules\grpc
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v3.8.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\LISANDRO\Desktop\borrar test\rapisuper\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\LISANDRO\Desktop\borrar test\rapisuper\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\LISANDRO\Desktop\borrar test\rapisuper\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\LISANDRO\Desktop\borrar test\rapisuper\node_modules\grpc\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:1048:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.19042
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\LISANDRO\\Desktop\\borrar test\\rapisuper\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Users\LISANDRO\Desktop\borrar test\rapisuper\node_modules\grpc
node-pre-gyp ERR! node -v v14.15.4
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\LISANDRO\Desktop\borrar test\rapisuper\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\Users\LISANDRO\Desktop\borrar test\

标签: node.jsnpmnpm-installyarnpkggyp

解决方案


推荐阅读