Skip to content

Installing to my node server running on elastic beanstalk #373

Closed
@anthonywebb

Description

I've been through several libraries looking for something that I can just deploy to elastic beanstalk and it will "just work", it seems like every library out there fails due to dependencies or some cryptic gyp message that happens as EB does the "npm install"

I really want sharp to work, so I'm willing to spend the time to see if I can get it going. Here is the error that is in the logs after I try to deploy to elastic beanstalk:

1193 info build /tmp/deployment/application/node_modules/sharp
1194 info preinstall sharp@0.13.1
1195 info linkStuff sharp@0.13.1
1196 silly linkStuff sharp@0.13.1 has /tmp/deployment/application/node_modules as its parent node_modules
1197 verbose linkBins sharp@0.13.1
1198 verbose linkMans sharp@0.13.1
1199 verbose rebuildBundles sharp@0.13.1
1200 verbose rebuildBundles [ '.bin', 'bluebird', 'color', 'nan', 'request', 'semver', 'tar' ]
1201 info install sharp@0.13.1
1202 verbose unsafe-perm in lifecycle false
1203 info sharp@0.13.1 Failed to exec install script
1204 verbose stack Error: sharp@0.13.1 install: node-gyp rebuild
1204 verbose stack Exit status 1
1204 verbose stack at EventEmitter. (/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
1204 verbose stack at emitTwo (events.js:87:13)
1204 verbose stack at EventEmitter.emit (events.js:172:7)
1204 verbose stack at ChildProcess. (/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/lib/node_modules/npm/lib/utils/spawn.js:24:14)
1204 verbose stack at emitTwo (events.js:87:13)
1204 verbose stack at ChildProcess.emit (events.js:172:7)
1204 verbose stack at maybeClose (internal/child_process.js:818:16)
1204 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
1205 verbose pkgid sharp@0.13.1
1206 verbose cwd /tmp/deployment/application
1207 error Linux 4.1.13-19.30.amzn1.x86_64
1208 error argv "/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/bin/npm" "--production" "rebuild"
1209 error node v4.2.3
1210 error npm v2.14.7
1211 error code ELIFECYCLE
1212 error sharp@0.13.1 install: node-gyp rebuild
1212 error Exit status 1
1213 error Failed at the sharp@0.13.1 install script 'node-gyp rebuild'.
1213 error This is most likely a problem with the sharp package,
1213 error not with npm itself.
1213 error Tell the author that this fails on your system:
1213 error node-gyp rebuild
1213 error You can get their info via:
1213 error npm owner ls sharp
1213 error There is likely additional logging output above.
1214 verbose exit [ 1, true ]

sharp@0.13.1 install /tmp/deployment/application/node_modules/sharp
node-gyp rebuild

gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 4.1.13-19.30.amzn1.x86_64
gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/deployment/application/node_modules/sharp
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok

npm ERR! Linux 4.1.13-19.30.amzn1.x86_64
npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/bin/npm" "--production" "rebuild"
npm ERR! node v4.2.3
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! sharp@0.13.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.13.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls sharp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /tmp/deployment/application/npm-debug.log
Running npm install: /opt/elasticbeanstalk/node-install/node-v4.2.3-linux-x64/bin/npm
Setting npm config jobs to 1
npm config jobs set to 1
Running npm with --production flag
Failed to run npm install. Snapshot logs for more details.

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions