MonkeyBonkey
MonkeyBonkey

Reputation: 47901

Elastic beanstalk postinstall errors when using webpack

I'm trying to deploy my fluxible node.js app to elastic beanstalk and I'm getting a permission error when I try to run the postinstall step. Is there a configuration I should be setting on elastic beanstalk?

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

Error

 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! [email protected] postinstall: `node install.js`

Upvotes: 1

Views: 471

Answers (1)

MonkeyBonkey
MonkeyBonkey

Reputation: 47901

Elastic beanstalk has an incompatibility with the unicode node module.

This is the workaround that AWS support gave me that works using 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"

Upvotes: 1

Related Questions