How to check webpack-v error after Webpack-cli installation is successful?
This article mainly introduces how to check the webpack-v error report after the successful installation of Webpack-cli. The article is very detailed and has a certain reference value. Interested friends must finish reading it!
Question 1. Install webpack webpack-cli
Npm install-g webpack webpack-cli
two。 View webpack version
Webpack-v
Error
/ usr/local/lib/node_modules/webpack/lib/cli.js:66 .replace (^ SyntaxError: Invalid regular expression: / (\ p {Uppercase_Letter} + |\ p {Lowercase_Letter} |\ d) (\ p {Uppercase_Letter} +) /: Invalid escape at pathToArgumentName (/ usr/local/lib/node_modules/webpack/lib/cli.js:66:4) at addFlag (/ usr/local/lib/node_modules/webpack/lib/cli.js:170:16) at traverse (/ usr/local/lib/node_modules/webpack/lib/cli.js:243:21) at traverse (/ usr/local/lib/node_modules/webpack/lib/cli.js:299:23) at traverse (/ usr/local/lib/node_modules/webpack/lib/cli.js:248:24) at Object.getArguments (/ usr/local/ Lib/node_modules/webpack/lib/cli.js:308:2) at Object. (/ usr/local/lib/node_modules/webpack-cli/lib/utils/cli-flags.js:245:30) at Module._compile (/ usr/local/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10) at Module.load (internal/modules/cjs/loader.js:566:32) solution 1. View node version node-vv9.11.2
Found that the node version is not up to date. Download and install the latest version of Node (LTS) on the official website.
Node-vv14.15.02. Upgrade npmnpm I-g npm3. Check webpack version webpack- vwebpack-cli 4.2.0webpack 5.4.0 or above is all the contents of this article "how to check webpack- v error after Webpack-cli installation is successful". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!