Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to eslint init locally on windows.

See original GitHub issue

Tell us about your environment

Environment: Windows 7. EsLint Version: v3.12.0. Node Version: v6.9.2. NPM Version: 3.10.9.

What did you do? Please include the actual source code causing the issue.

> npm install eslint --save-dev
> node_modules\eslint\bin\eslint.js --init

I expected the eslint process would begin with it’s usual questions.

I got a VB script error prompt.


Other notes

> npm install -g eslint

When I install eslint globally it works fine.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

platinumazurecommented, Dec 12, 2016

I assume the first character is a hash (as part of a shebang)… I thought Windows had a way of ignoring those, but I can’t recall offhand what that would be.

@kahneraja Possible workaround: Can you prepend the node binary?

> node node_modules\eslint\bin\eslint.js --init
platinumazurecommented, Dec 12, 2016

@thepiscean Note that we don’t generally recommend installing ESLint globally because then it won’t detect locally-installed plugins or sharable configurations. Instead, I think @kahneraja’s best bet is to run this with the node binary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESlint Error Install from Command Line - Stack Overflow
It looks like you're trying to install globally while your user doesn't have access to the global node_modules folder. You can try installing...
Read more >
Getting Started with ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
ESLint not working in VSCode? Help build a troubleshooting ...
The ESLint plugin requires permission to execute the local ESLint installation from your node_modules . Open the command palette ( Ctrl / Cmd...
Read more >
ESLint | PhpStorm Documentation - JetBrains
Make sure a local Node.js interpreter is configured in your project: open the Settings/Preferences dialog ( Ctrl+Alt+S ) and go to Languages ...
Read more >
Setting up ESLint in React - Medium
To create one, we can run eslint --init . ... if you're running ESLint locally, we run npm install eslint-plugin-react --save-dev .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found