Need to handle Node <4 users better (show better error message, possibly lock down version)
See original GitHub issueThe version of ESLint you are using.
3.x
The problem you want to solve.
Provide better error messages when users running an unsupported Node engine version are using ESLint.
Your take on the correct solution to problem.
Two basic options:
- Detect Node engine version and throw an exception for unsupported versions (using package.json to avoid hardcoding, and ideally using a pre-existing package)
- Attempt to catch certain exceptions (anything indicating an ES6 syntax error basically) in
bin/eslint.js
and display a nicer message to the user
Not sure which is the better option (or if there is a superior third option). Let’s discuss!
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
15 Common Error Codes in Node.js and How to Fix Them
Therefore, we've compiled this list of 15 common Node.js errors along with one or more strategies to follow to fix each one.
Read more >[BUG] npm ci can't resolve dependencies without --force, or ...
A package-lock.json file that works/was created in an older version of 8.x does not work when using a newer version of 8.x. Any...
Read more >Is there any way to fix package-lock.json lockfileVersion so ...
json was generated for lockfileVersion@2. I'll try to do my best with it! Is there any way to specify to newer versions of...
Read more >Error Codes | Yarn - Package Manager
A list of Yarn's error codes with detailed explanations.
Read more >Top 10 Most Common Node.js Developer Mistakes - Toptal
Mistake #2: Invoking a Callback More Than Once. JavaScript has relied on callbacks since forever. In web browsers, events are handled by passing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not sure we should do anything here. It’s clearly documented in the migration guide and npm already shows a warning.
@epoberezkin I think that linting is not required in all node versions in CI, so you can consider a use of if-node-version-like tool.