Reputation: 3532
If I run npm ls
at the top level of my project, I get a number of extraneous errors. I tried running npm prune
but when I run npm ls
again the packages are still there.
How do I remove those extraneous packages?
I have package-lock file and I'm running npm 6.4.1.
Upvotes: 2
Views: 4148
Reputation: 2782
First, did you do a npm i
to be sure to install all the packages? You can also delete your node_modules
folder and your package-lock.json
file to have a clean install.
Then if you want to remove packages, you need to npm uninstall
them or manually remove them from your package.json
file, then re-do a npm i
.
Upvotes: 1