Open rplopes opened 9 years ago
Hello @rplopes, it's linked with the upgrade to npm3, since npm3 flatten node directories I did not came up with a fix right know but I'm looking forward to it
Hi @FGRibreau. Thank you for the reply. However, I'm still using npm 2:
$ npm -v
2.14.7
Is this behaviour to be expected with this version of npm?
Is /node_modules/.bin/eslint
available ? Did you try to completly remove node_modules and then start an npm install again?
Yes, and running it from the node_modules
directory results in the same behaviour as running it as described above:
$ node_modules/.bin/eslint .
$ echo $?
0
Removing the node_modules
directory and running npm install
again results in the same error: check-build
will still try to load eslint
from node_modules/check-build/node_modules/.bin/eslint
and fail with No such file or directory
.
We just need to update check-build eslint.js with require.resolve('eslint')
to make it work
We've been using
check-build
to runjscs
andjshint
. We now wanted to addeslint
, butcheck-build
fails to load it (runningeslint
separately works fine).Simplified
package.json
:Our
.checkbuild
after addingeslint
:Running
eslint
independently works:However,
check-build
fails oneslint
:I don't fully understand if this is an issue with/node_modules/.bin/eslint instead, which exists) or looking at the right directory but for some reason not being shipped with the necessary bin.
check-build
looking foreslint
in the wrong directory (if it was meant to use