Installing eslint prevents devDependencies from being installed
See original GitHub issueI 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:
- Created 4 years ago
- Comments:24 (11 by maintainers)
Top 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 >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
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.
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.