我正在研究一个nodejs项目。启动应用程序时出现以下错误。
Failed to load gRPC binary module because it was not installed for the current system
extensionHostProcess.js:293
Expected directory: node-v57-darwin-x64-unknown
Found: [node-v64-darwin-x64-unknown]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module '/Users/dev/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64-unknown/grpc_node.node
根据描述,这意味着存在与firebase
相关的本机依赖项版本。我尝试了npm rebuild
,但似乎没有用。我正在使用节点版本:
node: v8.9.4
npm: 6.2.0
如何解决依赖关系问题?我应该尝试使用特定的节点版本还是应该重建一些本机库?