Reputation:
I have been trying to uninstall webpack (as it keeps giving me the text below when I run it),
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
The original webpack full-featured CLI.
- webpack-command (https://github.com/webpack-contrib/webpack-command)
A lightweight, opinionated webpack CLI.
We will use "npm" to install the CLI via "npm install -D".
Which one do you like to install (webpack-cli/webpack-command):
- Installed webpack-cli
- Installed webpack-command
- $env:NODE_ENV="production" --> $env:NODE_ENV="dev" or $env:NODE_ENV="development"
- npm uninstall webpack
- npm uninstall webpack --save
- npm uninstall webpack --save-dev
- npm -g uninstall webpack --save
- npm install yarn // to see if webpack could be installed via yarn
- Installed back webpack several times
- $ npm cache clean --force at several points in between to see if cache was the issue.
I want to build my Truffle app using webpack
Upvotes: 4
Views: 3586
Reputation: 95
I solved it moving webpack to devDependencies
npm install webpack --save-dev
Upvotes: 2
Reputation: 11
Try in your terminal for new version of webpack next command:
$ npx webpack
Upvotes: 0
Reputation:
After trying everything it wasn't working directly so I did it via,
npm run build
The build is calling webpack and it worked this way.
Upvotes: 3