【问题标题】:Elastic beanstalk postinstall errors when using webpack使用 webpack 时 Elastic beanstalk 安装后错误
【发布时间】:2017-10-26 09:15:10
【问题描述】:

我正在尝试将我的 Fluxible node.js 应用程序部署到弹性 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`

【问题讨论】:

  • 你能显示任何 webpack 配置吗?

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


【解决方案1】:

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"

【讨论】:

    猜你喜欢
    • 2020-06-08
    • 2016-03-11
    • 2020-09-18
    • 2017-08-27
    • 2021-02-01
    • 1970-01-01
    • 2018-07-01
    • 2019-11-08
    相关资源
    最近更新 更多