更新NodeJS后,我收到以下错误:无法加载gRPC二进制模块

问题描述 投票:0回答:2

我警告我当前的节点版本(7.10)不受支持后运行FireBase项目我使用npm更新它,当在localhost上运行我的服务器时出现以下错误:

Error: Failed to load gRPC binary module because it was not installed 
for the current system
Expected directory: node-v51-linux-x64-glibc
Found: [node-v59-linux-x64-glibc]
This problem can often be fixed by running "npm rebuild" on the current 
system

重新安装grpc whit这个命令没有帮助:

sudo npm install -g grpc
node.js firebase npm grpc firebase-admin
2个回答
0
投票

对我来说,跑步:

sudo npm install -g grpc --allow-root --unsafe

解决了我的问题。


0
投票

转到package.json目录,然后运行

sudo npm rebuild

© www.soinside.com 2019 - 2024. All rights reserved.