本文介绍了如何修复NPM安装节点-Pre-gyp错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行yarn install时,我收到以下错误:我已经删除了node_模块和ya n.lock文件,并再次尝试,但没有成功,似乎是GRPC看到了错误消息。

不确定该怎么办...有什么建议吗?

> [email protected] install /Users/mynamegoeshere/Desktop/Projects2/mydemoapp2/mydemoapp/node_modules/@firebase/firestore/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-darwin-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
rm: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! Failed at the [email protected] install script.
grpc库版本较旧,且与推荐答案的该版本不兼容。您应该使用较新版本的grpc或较旧版本的Node。grpc的最新版本当前为1.24.2。

这篇关于如何修复NPM安装节点-Pre-gyp错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 03:24