Closed Bug 1249900 Opened 9 years ago Closed 7 years ago

|mach eslint| fails after |mach eslint --setup| succeeded

Categories

(Developer Infrastructure :: Lint and Formatting, defect)

defect
Not set
normal

Tracking

(firefox47 affected)

RESOLVED WORKSFORME
Tracking Status
firefox47 --- affected

People

(Reporter: aryx, Unassigned)

References

Details

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 eslint@1.10.3 -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.
Component: mach → Lint
Product: Core → Testing
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
Closed: 7 years ago
Resolution: --- → WORKSFORME
Product: Testing → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.