Because Baidu is not very like to include language sparrow on the article, so the recent plan to put language sparrow record some things moved to CSDN and nuggets, the content of the article may be on the front end of the old driver no fresh ha! No blame no blame! But I will still be learning in front of the pit recorded, convenient beginners cross pit ha!

background

NPM UN XXXX is used to uninstall a dependency that is not needed. The console displays a large number of errors and you have to manually uninstall the dependency.

So how do we manually unload dependencies?

steps

1. Open node_modules and find the name of the dependency you want to uninstall. Here we use jS-cookie as an example.

2. Then press the Delete key to delete directly, return to the project package.json, find “jS-cookie “: “^2.2.0”, and delete it, as shown in the figure:

3. Return to the console under the project and run the following command:

npm un js-cookieCopy the code

When you enter, other words such as deprecated or even ERR are thrown! So far, I have not found any impact on the project. If you find any other errors, please leave a comment below! The reason for doing this is to make sure that other files have the configuration to write the dependency, in other words, to ensure that the dependency is uninstalled clean. This will easily unload useless dependencies!

This article is edited by the West pomelo team – left handed feng Zi, please attach the original link when reprinting, thank you for your cooperation!


Western pomelo official website:
www.seeyoz.cn/