Webpack installation issu

you can still output the version number of webpack by doing the following, but you cannot package it!

clipboard.png
:

clipboard.png

Mar.05,2021

if you want to use the webpack command, you need to install npm install-g webpack


if you only use the webpack command, global installation is fine. If the project uses require ('webpack'), you need to install it this way.


recommend a tutorial https://www.cnblogs.com/wisew.


the problem should not be installed globally. Otherwise, there is no version number, it should be caused by not installing webpack-cli, and both should be installed after 4.x.

Menu