webpack -v error solution

webpack -v error solution

background

I want to check the webpack version, but executing webpack -v reports an error

insert image description here

Solution

Step 1: Run the command npm list --depth=0 -g to check the compatibility of webpack, webpack-cli and other versions

insert image description here

For example, the above prompt means that you have installed [email protected], but your webpack version does not match (prompts that the version is too low). You need to install a version above v4.37.0, or directly install v5.0.0 (for example, directly install v4.37.0: npm install -g [email protected])

Step 2: Run the command npm list --depth=0 -g again to check

insert image description here

At this point, the detection has no errors, indicating that the webpack and webpack-cli versions have matched

Step 3: Execute webpack -v and still report an error

insert image description here

Run npm init -y to automatically configure package.json, then execute webpack -v to view the version normally.

insert image description here

Related links

webpack -v reports an error

Webpack builds Vue environment error

Mac node delete and reinstall

Webpack & Webpack-cli After successful installation, check webpack -v error

This is the end of this article about webpack -v error solution. For more relevant webpack -v error solution content, please search 123WORDPRESS.COM’s previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Summary of vue's webpack -v error solution
  • Electron-vue uses webpack to package multiple pages of entry files
  • After Webpack-cli is successfully installed, check the webpack -v error case for details

<<:  How to install Nginx in a specified location in Centos system

>>:  Implementing add, delete, modify and query operations on MySQL based on sqlalchemy

Recommend

A brief understanding of MySQL storage field type query efficiency

The search performance from fastest to slowest is...

Explanation of the process of docker packaging node project

As a backend programmer, sometimes I have to tink...

Essential knowledge for web development interviews and written tests (must read)

The difference between inline elements and block-...

How to store text and pictures in MySQL

Large Text Data Types in Oracle Clob long text ty...

Tutorial diagram of installing zabbix2.4 under centos6.5

The fixed IP address of the centos-DVD1 version s...

How to implement MySQL master-slave replication based on Docker

Preface MySQL master-slave replication is the bas...

Interpretation of the module for load balancing using nginx

Table of contents Two modules for using nginx for...

Summary of the data storage structure of the nginx http module

Starting from this section, we will explain the i...

Steps to deploy hyper-V to achieve desktop virtualization (graphic tutorial)

The hardware requirements for deploying Hyper-V a...

MySQL 5.7.17 installation and configuration method graphic tutorial under win7

I would like to share with you the graphic tutori...

Example analysis of mysql non-primary key self-increment usage

This article uses an example to illustrate the us...

A few experiences in self-cultivation of artists

As the company's influence grows and its prod...

Tutorial on using iostat command in Linux

Preface It is said that if the people doing opera...