I am setting up my environment on lint ES6 . I installed eslint and see it in my node_modules . In my node_modules/bin , I have an eslint command.
I can run the command and specify it in the directory, and I get no errors:
./node_modules/.bin/eslint src/main/webapp/js/lcrf
I can see all the lint errors that I need to fix.
I also added a command to my package.json :
"scripts": { "lint": "eslint src/main/webapp/js/lcrf" },
Now I am trying to run a command using npm run lint . This lint my files, and I get the same number of lint errors, but then node errors. Here is my stack:
npm ERR! Darwin 14.3.0 npm ERR! argv "node" "/usr/local/bin/npm" "run" "lint" npm ERR! node v0.12.2 npm ERR! npm v2.7.4 npm ERR! code ELIFECYCLE npm ERR! lcrf@0.0.0 lint: `eslint src/main/webapp/js/lcrf` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the lcrf@0.0.0 lint script 'eslint src/main/webapp/js/lcrf'. npm ERR! This is most likely a problem with the lcrf package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! eslint src/main/webapp/js/lcrf npm ERR! You can get their info via: npm ERR! npm owner ls lcrf npm ERR! There is likely additional logging output above.
What can happen? What is the difference between the two ways that I execute a command?
jhamm source share