Node 4.2.3 has been installed into C:\Program Files\nodejs. System in Windows 8.1. User@Computer /c/Mozilla/Coding/Code/fx-team $ ./mach eslint --setup Installing eslint using "C:\Program Files (x86)\nodejs\npm.cmd install email@example.com -g"... Installing eslint-plugin-mozilla using "C:\Program Files (x86)\nodejs\npm.cmd link"... Installing eslint-plugin-html using "C:\Program Files (x86)\nodejs\npm.cmd install eslint-plugin-html -g"... Installing eslint-plugin-react using "C:\Program Files (x86)\nodejs\npm.cmd install eslint-plugin-react -g"... ESLint and approved plugins installed successfully! User@Computer /c/Mozilla/Coding/Code/fx-team $ ./mach eslint Could not find eslint! We looked at the --binary option, at the ESLINT environment variable, and then at your path. Install eslint and needed plugins with mach eslint --setup and try again.
Thanks to Gijs for the tip: To get it working on Windows, you have to create .profile file in /c/Users/yourUsername (if you don't have it yet) and extend the PATH: > export PATH=$PATH:/c/Program\ Files\ \(x86\)/nodejs/:/c/Users/yourUsername/AppData/Roaming/npm/ You might need to modify the nodejs path.
Seems like mach could/should do some of that automatically though, in terms of running eslint which it has installed itself - it clearly knows where stuff is. Alternatively, it could tell you where it installed stuff and that it needs to be added to $PATH.
MozillaBuild now has node installed. Additionally we've done various work to improve the messages & mention what exactly is missing (e.g. node vs npm). So I think this can be closed as WFM now.
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.