I'm trying to deploy my node.js app via eb create
, but am getting the following error:
2020/05/17 02:15:37.303673 [ERROR] An error occurred during execution of command [app-deploy] - [Use NPM to install dependencies]. Stop running the command. Error: Command /bin/sh -c npm --production install failed with error exit status 1. Stderr:npm WARN deprecated buffer@4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.5.0 and node@12.16.2 (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/var/app/staging/node_modules/canvas/build'
I have a .ebextensions/00_canvas.cfg
that has:
packages:
yum:
cairo: []
cairo-devel: []
libjpeg-turbo-devel: []
giflib-devel: []
libpng-devel: []
and a .ebextensions/01_permissions.cfg
:
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/00_npm_permission.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
chown -R nodejs:nodejs /tmp/.npm
chown -R nodejs:nodejs /var/app/staging/node_modules/canvas
What am I missing?