Webpack is installed globally, execute webpack-v or report an error

clipboard.png

ask the bosses, why is this?
doesn"t executing the-g command automatically add to the system"s environment variables?
how else can I find the path where the webpack is stored?
sincerely thank the kind-hearted people for solving their doubts.

Mar.12,2021

node try again. At the top of the screenshot of the path is c:user answer.


Uninstall it first, npm uninstall , and then reinstall it.

not really, use webpack-cli .

npm install webpack-cli -g

webpack4 recommends that the node version is greater than 8.0, and webpack-cli, needs to be installed. officially, global installation of webpack, is not supported because this will affect the weback upgrade of the project. Just install it in the project

Menu