繁体   English   中英

npm 未能在反应项目中执行错误

[英]npm failed to execute error in a react project

我已删除.lock文件和node_modules并尝试再次安装。 但是,它不起作用。 你能帮我修一下吗?


npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=J:\React Projects\react-context-lesson\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=J:\React Projects\react-context-lesson\node_modules\grpc\src\node\extension_binary\node-v93-win32-x64-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (J:\React Projects\react-context-lesson\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19044
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "J:\\React Projects\\reacnpm ERR! node-pre-gyp ERR! cwd J:\React Projects\react-context-lesson\node_modules\grpc
npm ERR! node-pre-gyp ERR! node -v v16.13.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.13.0
npm ERR! node-pre-gyp ERR! not ok

我认为这可能与 Node.js 的版本有关。 可以试试 14 版吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM