gpt4 book ai didi

node.js - 预期目录 : node-v83-linux-x64-musl. 发现:[node-v72-linux-x64-musl]

转载 作者:行者123 更新时间:2023-12-05 06:16:09 24 4
gpt4 key购买 nike

Grpc版本:1.24.2

在部署我的 Node.js 应用程序时,我遇到了 grpc package 的二进制文件问题.

错误:

Error: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: node-v83-linux-x64-musl
Found: [node-v72-linux-x64-musl]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module '/app/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-musl/grpc_node.node'

我在 Dockerfile 中尝试了这些命令:

  • npm 重建
  • npm install --unsafe-perm
  • npm install --target=13.0.0 --target_platform=linux --target_arch=x64

Docker 文件(found here):

FROM node:lts-alpine
WORKDIR /app

COPY package*.json ./

RUN apk add --no-cache --virtual .gyp \
python \
make \
g++ \
&& npm install \
&& apk del .gyp gcc g++ python

COPY . .

RUN npm run build

EXPOSE 9080

CMD ["npm", "start"]

我还尝试配置二进制文件的位置,但没有找到 node-v83-linux-x64-musl。 Configure binaries location

相关问题:

我需要你的帮助! — murgatroid99

最佳答案

Module version 83 corresponds to Node 14, not 13. Unfortunately, we have not yet published binaries for Node 14, so it's going to be difficult to get that working

完整答案 - https://github.com/grpc/grpc-node/issues/1460#issuecomment-638965479

关于node.js - 预期目录 : node-v83-linux-x64-musl. 发现:[node-v72-linux-x64-musl],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62197778/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com