未找到 grpc@1.10.1 和 node@10.9.0 的预构建二进制文件 [英] Pre-built binaries not found for grpc@1.10.1 and node@10.9.0

查看:23
本文介绍了未找到 grpc@1.10.1 和 node@10.9.0 的预构建二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在我的项目中安装 node_modules 时收到大量错误消息.我之前已经成功安装了它,但我不确定我做错了什么导致现在生成所有这些错误消息.

I'm getting a mass of error messages when I try to install node_modules in my project. I've previously installed it successfully, but I'm not sure what I've done wrong to cause all these error messages to be generated now.

任何帮助破译它们的意思都会很棒.就在此之前,我做了以下grpc的安装,其中安装了v1.14.1:

Any help to decipher what they mean would be great. Just before this, I did the following install of grpc, which installed v1.14.1:

$ npm install -g grpc@latest

grpc@1.14.1 install /usr/local/lib/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using needle for node-pre-gyp https download 
[grpc] Success: "/usr/local/lib/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" is installed via remote
+ grpc@1.14.1
added 85 packages from 48 contributors in 6.344s

所以很好奇为什么节点会在以下消息中尝试使用 v1.10.1:

so it's curious why node is trying to use v1.10.1 in the following messages:

$ npm i

> fsevents@1.2.4 install /path/to/app/node_modules/fsevents
> node install

[fsevents] Success: "/path/to/app/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> grpc@1.10.1 install /path/to/app/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 grpc@1.10.1 and node@10.9.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Pre-built binaries not installable for grpc@1.10.1 and node@10.9.0 (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
sed: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.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
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /path/to/app/node_modules/@firebase/firestore/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /path/to/app/node_modules/@firebase/firestore/node_modules/grpc
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.oexec install script
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.oinstall script
error: error reading '../deps/grpc/src/core/lib/channel/channel_args.cc'
1 error generated.
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0l: info lifecycle grpc@1.10.1~install: Failed to exec install script
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /path/to/app/node_modules/@firebase/firestore/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.10.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc@1.10.1 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!     /Users/myfolder/.npm/_logs/2018-09-03T16_54_49_177Z-debug.log

推荐答案

找了一段时间,但对我有用的解决方案是:

It took a while to find, but the solution that worked for me was:

  1. 删除 node_modules/grpc 文件夹
  2. 删除项目根目录下的package-lock.json文件
  3. npm 重建 node-sass

ionic serve 和 build 命令现在适用于 ios.

The ionic serve and build commands now work for ios.

编辑(2018-09-07):

Edit (2018-09-07):

虽然上述步骤暂时奏效,但grpc 1.10.1问题后来又回来了.经过更多调查并感谢@murgatroid99 的提示,我发现问题是由 firebase 插件中的旧版 firestore 引起的,该插件在 package.json 中引用了 grpc v1.10.1.

Although the above steps worked temporarily, the grpc 1.10.1 problem came back later. After much more investigation and thanks to a prompt from @murgatroid99, I found the problem was being caused by an old version of firestore in the firebase plugin, which was referencing grpc v1.10.1 in it's package.json.

在我将 firebase 更新到最新版本后:

After I updated firebase to the latest version with:

npm i firebase@latest

它使用 v1.13.1 报告,问题消失了.

it reporting using v1.13.1 and the problem went away.

希望对遇到同样问题的人有所帮助.

I hope that helps anyone having the same problem.

这篇关于未找到 grpc@1.10.1 和 node@10.9.0 的预构建二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆