WEBPACK commands do not work

0

I installed the webpack with the command npm install webpack -g , but when I try to use the webpack -h or any other command of this problem

> PS C:\Users\renan\Desktop\Wchat> webpack -h The CLI moved into a
> separate package: webpack-cli Would you like to install webpack-cli?
> (That will run npm install -D webpack-cli) (yes/NO)

After yes, the following error appears

PS C:\Users\renan\Desktop\Wchat> webpack -h
The CLI moved into a separate package: webpack-cli
Would you like to install webpack-cli? (That will run npm install -D webpack-cli) (yes/NO)yes
npm WARN deprecated [email protected]:                     
asked by anonymous 01.05.2018 / 06:14

1 answer

1

Error could have been caused due to the order of -g argument in the command, which according to documentation is:

npm install -g webpack-cli

other than Yarn which is:

yarn add webpack-cli -g

Reference

01.05.2018 / 06:57