eslint-watch: Fails to run on Windows when eslint is installed globally.
Environment
- Node Version: v6.10.3
- Eslint-Watch Version: 3.10
- Eslint Version: 3.19.0
Basic Description of the problem
When running esw I get that eslint-watch cannot find eslint. The command esw will not run at all even with -h, --esw-version.
How to reproduce it
- Command:
esw ...
- …
Debug output:
// to grab debug output set DEBUG=esw:*
throw new Error('Eslint needs to be installed globally or locally in node_modules.');
^
Error: Eslint needs to be installed globally or locally in node_modules.
at loadEslintPath (C:\Users\<username>\AppData\Roaming\npm\node_modules\eslint-watch\src\settings.js:24:13)
at Object.<anonymous> (C:\Users\<username>\AppData\Roaming\npm\node_modules\eslint-watch\src\settings.js:10:
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\<username>\AppData\Roaming\npm\node_modules\eslint-watch\src\index.js:4:1)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (8 by maintainers)
I am closing this since it seems to only happen on one machine.