I have installed webpack in this way:
npm install -g webpack
Now want to uninstall it:
npm uninstall -g webpack
Check it again, it didn't been uninstalled:
webpack -v 3.1.0
Why?
And, I use this way can't find webpack
:
npm list -g | grep webpack
This also didn't work:
npm uninstall -g webpack --save
After run this under a directory which included package.json
:
npm uninstall webpack npm WARN [email protected] requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed. npm WARN [email protected] requires a peer of uglify-js@^2.8.0 but none was installed. npm WARN [email protected] requires a peer of webpack@^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc but none was installed.
Uninstalling global packages To uninstall an unscoped global package, on the command line, use the uninstall command with the -g flag. Include the scope if the package is scoped.
Just like you use the flag “-g” or “-global” before the name of the package to be installed in the packages globally, you use “-g” or “-global” before the name of the package you want to uninstall.
On the npm "Sign In" page, enter your account details and click Sign In. Navigate to the package page for the package you want to unpublish, replacing <your-package-name> with the name of your package: https://www.npmjs.com/package/<your-package-name> . Click Settings. Under "delete package", click Delete package.
Try running both of the below commands:
npm uninstall -g webpack npm uninstall webpack
I think you might be checking/looking at the local version after deleting only the global one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With