node-gyp rebuild 问题
发布于 9 个月前 作者 spursy 1709 次浏览 来自 问答
  • 公司服务器不能访问墙外网站
  • 我在公司的服务器上 build 镜像的时候出现下面的问题,求大神指点。

我一直猜测是网络问题,但是我在我的一台私人国内云服务器 build 镜像并不会存在下面的问题呀。

> scrypt@6.0.3 install /home/node/bi-nodesrv-doctor/node_modules/scrypt
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
gyp ERR! System Linux 4.15.0-43-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/node/bi-nodesrv-doctor/node_modules/scrypt
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN co-mocha@1.2.2 requires a peer of mocha@>=1.18 <6 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the scrypt@6.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
1 回复

首先确认下你所用的包是否兼容现有服务器系统版本,不同linux版本默认安装的依赖也有所不同,其次看网络是否有问题。

回到顶部