my project works but eslint show an err-message: 'async should appear in package.json dependencies'. async appear in package-lock and not appear at package.json dependancies and I don't get how can it be that everything still works?
Asked
Active
Viewed 82 times
0
-
Can you share your package.json file? It looks like you forgot to run npm install. If that not works remove the node_module folder and run npm install again. – Maik Lowrey Jun 27 '22 at 07:33
-
If the linter gives an error it will include a rule name - what is it? Did you read the relevant guidance? It's entirely normal for transitive dependencies to be in the lock file but not the package file. – jonrsharpe Jun 27 '22 at 07:35
-
import/no-extraneous-dependencies – Tal Wind Jun 27 '22 at 09:12
-
I prefer not to npm i async if not necessary because it'll change me all package.lock and this is a company project . I'm not sure if the right thing here is to disable eslint for one line. – Tal Wind Jun 27 '22 at 09:14
-
Currently you're importing and using a _transitive_ dependency. If something else in your dependency tree updates its own dependencies such that `async` is no longer included, your code will suddenly stop working. – jonrsharpe Jun 27 '22 at 09:27
-
the code is working now, I just dont want to install async because it will change the versions in package-lock and change the whole project – Tal Wind Jun 27 '22 at 10:22