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

RESOLVED WORKSFORME

Status

RESOLVED WORKSFORME
3 years ago
10 months ago

People

(Reporter: aryx, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(firefox47 affected)

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.

Comment 2

3 years ago
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
Last Resolved: a year ago
Resolution: --- → WORKSFORME

Updated

10 months ago
Product: Testing → Firefox Build System
You need to log in before you can comment on or make changes to this bug.