how to remove webpack 4.44

1.4k views Asked by At

I'd like to uninstall webpack 4.44.1. The SO post here on this did not work for me. When I run:

> npm uninstall -g [email protected]
up to date in 0.134s

and then when I run:

npm list -g [email protected]

it shows:

C:\Users\me\AppData\Roaming\npm
`-- (empty)

But, when I run:

npm ls

It gives me:

+-- [email protected]
+-- [email protected]
| +-- @webassemblyjs/[email protected]
| | +-- @webassemblyjs/[email protected] deduped
| | +-- @webassemblyjs/[email protected]
| | `-- @webassemblyjs/[email protected]
| |   +-- @webassemblyjs/[email protected] deduped
| |   +-- @webassemblyjs/[email protected]
| |   +-- @webassemblyjs/[email protected] deduped
| |   +-- @webassemblyjs/[email protected]
| |   | `-- @webassemblyjs/[email protected] deduped
| |   +-- @webassemblyjs/[email protected]
| |   ... (for brevity, I am not including the rest)

So, my question is why is the webpack 4.44.1 shows up again and how to effectively uninstall it?

2

There are 2 answers

1
Eloho Kennedy On

Try running npm uninstall -g webpack --save npm uninstall webpack --save

Run the two lines of code above

0
Eloho Kennedy On

ok install this npm module npm i -D webpack-cli @webpack-cli/remove go to the current project you are having problems with and run this command

const remove = require("@webpack-cli/remove").default;

remove();

or via terminal

npx webpack-cli remove

try that and see how it goes