【发布时间】:2018-07-02 00:28:16
【问题描述】:
我正在尝试将我的 AWS 弹性 beanstalk 实例中的 node.js 版本更新为 Amazon 最新 AMI 版本中包含的最新支持版本 v8.9.3:https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html#concepts.platforms.nodejs
但是,当我在配置 -> 软件配置 -> 节点版本 -> 8.9.3 中更改版本号时,我收到以下错误:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/tmp/deployment/application/node_modules/synchronize/node_modules/fibers/build'
gyp ERR! System Linux 4.9.76-3.78.amzn1.x86_64
gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v8.9.3-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v8.9.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /tmp/deployment/application/node_modules/synchronize/node_modules/fibers
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
ETC........
我已将实例更新为配置“64bit Amazon Linux 2017.09 v4.4.4 running Node.js”,文档中说它支持 V8.9.3
我已尝试按照此答案 Beanstalk: Node.js deployment - node-gyp fails due to permission denied 中的描述将 .npmrc 文件添加到项目中,但仍然遇到相同的错误。
【问题讨论】:
-
您似乎有权限问题
-
是的,我尝试将“unsafe-perm=true”添加到 .npmrc 文件(在项目根目录中),但仍然出现相同的错误。
标签: node.js amazon-web-services amazon-ec2 amazon-elastic-beanstalk