Wednesday 19 April 2017

/.bin/webpack Webpack command not found after Node nvm update in prod env

After upgrading my project from using Node v5.0.0 to 6.10.2 (via nvm), my Travis build is now failing with the error:

/home/travis/build/Widen/gray-wolf/node_modules/.bin/webpack --config config/webpack.config.js -p make: /home/travis/build/Widen/gray-wolf/node_modules/.bin/webpack: Command not found make: *** [webpack] Error 127

In our MAKE scripts, the commands ultimately being called are as followed:

npm install (this does not seem to be failing)

$(NPM_BIN)/webpack --config config/webpack.config.js -p

Following npm install, one of the lines is:

webpack@2.3.3 node_modules/webpack before the webpack command fails

The ways where this is not failing are

  1. nvm version is set to 5.0.0 instead of 6.10.2
  2. It's in a stage environment instead of prod environment

The initial failure happened alongside a large amount of updated dependencies, so I limited the change to only update Node with nvm with the following commands in my .travis.yml file:

install: - . $HOME/.nvm/nvm.sh - nvm install 6.10.2 - nvm use 6.10.2

The only difference being the version number. Following that failure, I'm getting another similar failure with eslint. It seems likely that the failures have the same cause.

make: /home/travis/build/Widen/gray-wolf/node_modules/.bin/eslint: Command not found



via st1ph1n

No comments:

Post a Comment