npm-run-all: Failure to find ../common/bootstrap when running on Linux

I keep getting this error when trying to use npm-run-all on a Linux machine, but do not see it on OSX. Same version of npm (5.5.1) on both, same version of Node.JS (8.9.3) on both:

`

08-Dec-2017 17:15:30 > npm-run-all lint:*
08-Dec-2017 17:15:30
08-Dec-2017 17:15:30 module.js:538
08-Dec-2017 17:15:30 throw err;
08-Dec-2017 17:15:30 ^
08-Dec-2017 17:15:30
08-Dec-2017 17:15:30 Error: Cannot find module ‘…/common/bootstrap’
08-Dec-2017 17:15:30 at Function.Module._resolveFilename (module.js:536:15)
08-Dec-2017 17:15:30 at Function.Module._load (module.js:466:25)
08-Dec-2017 17:15:30 at Module.require (module.js:579:17)
08-Dec-2017 17:15:30 at require (internal/module.js:11:18)
08-Dec-2017 17:15:30 at Object.<anonymous> (/root/bamboo-agent-home/xml-data/build-dir/ATP-UV2741-JUT/node_modules/.bin/npm-run-all:13:1)
08-Dec-2017 17:15:30 at Module._compile (module.js:635:30)
08-Dec-2017 17:15:30 at Object.Module._extensions…js (module.js:646:10)
08-Dec-2017 17:15:30 at Module.load (module.js:554:32)
08-Dec-2017 17:15:30 at tryModuleLoad (module.js:497:12)
08-Dec-2017 17:15:30 at Function.Module._load (module.js:489:3)
08-Dec-2017 17:15:30 npm ERR! code ELIFECYCLE
08-Dec-2017 17:15:30 npm ERR! errno 1
08-Dec-2017 17:15:30 npm ERR! vfdp-html@4.25.0 lint: npm-run-all lint:*
08-Dec-2017 17:15:30 npm ERR! Exit status 1
08-Dec-2017 17:15:30 npm ERR!
08-Dec-2017 17:15:30 npm ERR! Failed at the vfdp-html@4.25.0 lint script.
08-Dec-2017 17:15:30 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
08-Dec-2017 17:15:30
08-Dec-2017 17:15:30 npm ERR! A complete log of this run can be found in:
08-Dec-2017 17:15:30 npm ERR!     /root/.npm/_logs/2017-12-08T23_15_30_404Z-debug.log
08-Dec-2017 17:15:30 npm ERR! code ELIFECYCLE
08-Dec-2017 17:15:30 npm ERR! errno 1
08-Dec-2017 17:15:30 npm ERR! vfdp-html@4.25.0 pretest: npm run lint
08-Dec-2017 17:15:30 npm ERR! Exit status 1
08-Dec-2017 17:15:30 npm ERR!
08-Dec-2017 17:15:30 npm ERR! Failed at the vfdp-html@4.25.0 pretest script.
08-Dec-2017 17:15:30 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

`

The file node_modules/npm-run-all/bin/common/bootstrap.js does exist, but the error above seems to indicate that npm-run-all gets run from node_modules/.bin, not node_modules/npm-run-all/bin… so as a result, the file common/bootstrap.js doesn’t exist

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

Don’t think it applies to anyone who’s commented so far, but note that this can happen if you’ve copied node_modules without preserving symlinks, so your .bin is full of scripts instead of links to scripts; then the relative path to ../common/bootstrap.js doesn’t work anymore

Don’t think it applies to anyone who’s commented so far, but note that this can happen if you’ve copied node_modules without preserving symlinks, so your .bin is full of scripts instead of links to scripts; then the relative path to ../common/bootstrap.js doesn’t work anymore

+1, I just deleted the node_modules folder and did a npm install. Back up and running now.

any updates? I am running with the same issue on AWS ElasticBeanstalk npm --version 2.15.11 node --version v4.8.5