execSync
execSync copied to clipboard
npm install fails inside docker container
> node install.js
sh: 1: node: Permission denied
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "/root/node-v4.1.2-linux-x64/bin/node" "/root/node-v4.1.2-linux-x64/bin/npm" "install"
npm ERR! node v4.1.2
npm ERR! npm v2.14.4
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script 'node install.js'.
npm ERR! This is most likely a problem with the execSync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls execSync
npm ERR! There is likely additional logging output above
I got same bug. @anderspitman how did you solve it?
@hyzhak sorry this was a while ago and I don't remember, but I think I solved it by removing execSync from the package.json of the package that required it. It think it may have been grunt or something.
Found it!. That dockerfile explains the fix.