I am new to Node.js, npm and sublime environment and I am finding it difficult to integrate ESlint with sublime editor.
The steps which I followed is as follows:
npm install -g eslint
Now getting following error in Sublime editor:
module.js:327 throw err; ^ Error: Cannot find module 'eslint' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (C:\Users\MyUser\AppData\Roaming\Sublime Text 3\Packages\ESLint\linter.js:12:17) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) [Finished in 0.2s with exit code 1]
Go to "Preferences / Package Settings / ESLint / Settings - User" in the menu bar, and enter the following (file paths may vary):
{ "node_path": "/usr/local/bin", "node_modules_path": "/usr/local/lib/node_modules" }
Here's the GitHub page: https://github.com/polygonplanet/sublime-text-eslint. Scroll down to the "Configuring ESLint" section, it's all documented there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With