简体   繁体   中英

Cannot Uninstall two npm Packages

I have installed node-gyp in order to install scrypt. While installing the node-gyp package the following two packages were installed along with it:

101@1.6.3

d@1.0.1

I have tried to remove these two packages, realising that I did not need the node-gyp and scrypt packages, but sudo npm uninstall does not remove them. How can I uninstall these packages?

If your package.json file contains entries for these modules (101@1.6.3 and d@1.0.1), delete those lines.

Then delete your package-lock.json file.

Then delete your node_modules folder.

Now run npm install

Its Depends on how you have installed those packages.

if it's a local package to the project

use " npm uninstall --save 'package name '" or simply remove the package from package.json of your project. Then Delete node_modules folder and install npm again using "npm install"

if it's a global package use [sudo] npm uninstall -g "package name"

use sudo based on which OS your are using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM