使用webpack时弹性beanstalk postinstall错误

时间:2017-05-25 16:20:09

标签: node.js amazon-web-services npm elastic-beanstalk

我尝试将我的fluxible node.js应用程序部署到弹性beanstalk,并且当我尝试运行postinstall步骤时,我收到了权限错误。我应该在弹性beanstalk上设置配置吗?

"postInstall":  "node_modules/.bin/webpack --config webpack.config.production.js",

错误

 Error: EACCES: permission denied, open '/tmp/deployment/application/node_modules/unicode/category/Cc.js'
      at Error (native)

  npm ERR! Linux 4.9.27-14.31.amzn1.x86_64
  npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.10.0-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.10.0-linux-x64/bin/npm" "--production" "rebuild"
  npm ERR! node v6.10.0
  npm ERR! npm  v3.10.10
  npm ERR! code ELIFECYCLE
  npm ERR! unicode@0.6.1 postinstall: `node install.js`

1 个答案:

答案 0 :(得分:0)

Elastic beanstalk与unicode节点模块不兼容。

这是AWS支持人员使用ebextensions工作的解决方法。

.ebextensions/unicode.config

packages:
  yum:
    unicode-ucd: []

commands:
  symlink_unicode:
    command: "ln -fs /usr/share/unicode/ucd/UnicodeData.txt /usr/share/unicode/UnicodeData.txt"