Still not installed correctly. First CD to the folder where the project is located on the command line, and then execute npm install --save-dev webpack
I just solved it myself When installing a package with npm, if you use global installation, that is, npm install <packageName> -g, you can run it as a command in the terminal after the installation is completed, but if it is a locally installed packagenpm install --save-dev <packageName>, it cannot be run directly like this. So how do you run a locally installed package? First enter the project directory (that is, the directory where package.json is located), and then use the following command to run:
You have to create a new webpack.config.js file in the project root directory
One hour package meeting
Still not installed correctly. First CD to the folder where the project is located on the command line, and then execute npm install --save-dev webpack
I just solved it myself
When installing a package with npm, if you use global installation, that is,
npm install <packageName> -g
, you can run it as a command in the terminal after the installation is completed, but if it is a locally installed packagenpm install --save-dev <packageName>
, it cannot be run directly like this. So how do you run a locally installed package? First enter the project directory (that is, the directory where package.json is located), and then use the following command to run: