2017-05-25 61 views
1

我試圖部署我的通用node.js應用程序到彈性beanstalk,當我嘗試運行postinstall步驟時遇到權限錯誤。有沒有我應該在彈性豆莖上設置的配置?使用webpack時Elastic beanstalk postinstall錯誤

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

,你能否告訴任何的WebPack配置的? –

回答

0

彈性豆莖具有與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"