question-mark
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.

Installing eslint prevents devDependencies from being installed

See original GitHub issue

I tried a fresh install on a new npm project and I found out that most of the devDependencies eg shelljs, are not installed after I run “npm install eslint”.

I copied all the dependencies and devDepencies from eslint/package.json into my local package.json and run “npm install” but I got two blockers:

`"eslint-config-eslint": "file:packages/eslint-config-eslint",`
**Could not install from "packages\eslint-config-eslint" as it does not contain a package.json file.**

`"eslint-plugin-internal-rules": "file:tools/internal-rules",`
**Could not install from "tools\internal-rules" as it does not contain a package.json file.**

If I remove these two lines and run again “npm install” all the devDependecies are installed properly so I could find then inside /node_modules Not sure if the problem is related to these two described above but the problem is that eslint does not install devDependencies

OS: windows 10

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
mysticateacommented, Jun 11, 2019

Thanks. Looks like C:\Users\frontend\gulp\build.js:16:15 is the cause. (I deleted my previous comment that included another path.)


If you use a package in your code, you must have the package in your package.json.

If you use a package that another package depends on, it will be broken if the “another package” is uninstalled. Such a package is called “extraneous package”. If you want to detect the use of extraneous packages, you can use node/no-extraneous-require or import/no-extraneous-dependencies.

0reactions
enoh-barbucommented, Jun 11, 2019

Yes, that was the problem but I wasn’t aware of it as the project is new for me too. I only went to upgrade eslint but I couldn’t realize that in the beginning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint error on deployment on local server of react web app
Remove eslint from dependencies and/or devDependencies in the package.json file in your project folder. Run npm install or yarn , depending on ...
Read more >
Linting in TypeScript using ESLint and Prettier - LogRocket Blog
Let's see how to install ESLint into our TypeScript project. First, install the following dependencies to your devDependencies : npm install ...
Read more >
Installing Dev Dependencies with npm: Beginners' Guide
Here we've curated a complete guide comprising 101 npm install devDependencies. Whether you are using npm exclusively with Node.js or as a ...
Read more >
lint-staged - npm
Install lint-staged itself: npm install --save-dev lint-staged. Set up the pre-commit git hook to run lint-staged.
Read more >
ESLint not working in VSCode? Help build a troubleshooting ...
Did you run npm install ? · Did you try turning it off and on again? · Did you install ESLint + Plugins...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found