grpc@1.7.2安装脚本失败

时间:2017-12-06 18:29:09

标签: node.js docker npm

我正在尝试部署包含react应用程序的构建Docker镜像。我正在尝试使用node:8-alpine作为我的基本图像。但是,我在npm安装层期间遇到此错误。我尝试使用标准node基本图像,并且每件事情都运行正常,但文件大小为1GB,所以我真的很想使用alpine。

我正在运行macOS 10.12.6 node 8.7.0

Failed to execute '/usr/local/bin/node /usr/src/app/node_modules/node-
gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --
module=/usr/src/app/node_modules/grpc/src/node/extension_binary/node-v57-
linux-
x64-musl/grpc_node.node --module_name=grpc_node --
module_path=/usr/src/app/node_modules/grpc/src/node/extension_binary/node-v57-
linux-x64-musl' (1)
npm info lifecycle grpc@1.7.2~install: Failed to exec install script
npm WARN sign-in-app@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.7.2 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.7.2 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!     /root/.npm/_logs/2017-12-06T18_26_09_926Z-debug.log

1 个答案:

答案 0 :(得分:1)

今天上午遇到同样的问题。看起来预编译的grpc1.7.2尚未上传基于musl的发行版(alpine是musl vs glibc)

从短期来看,要让您的构建重新开始,直到他们上传预编译版本,请尝试将其添加到您的dockerfile

$pages = Page::where('path', $request->path())->where('method', $_SERVER["REQUEST_METHOD"])->first()->relatedPages

python,make和g ++基本上允许node-gyp从源代码编译而不是依赖于预编译版本