Error: Unknown option '--inline' error solution

Error content

[webpack-cli] Error: Unknown option '--inline'
[webpack-cli] Run 'webpack --help' to see available commands and options

Error screenshot

Alt!

Error scene

I moved the code that was originally built and run on the windows system to the ubuntu system, and such an error was reported when executing npm run dev (all related dependent software has been installed).
I searched the Internet for a long time but couldn't find a solution. Later, I found someone mentioned a solution to this problem on an English website, but it may be that the usage scenario is wrong and it was not adopted. But that solution is effective for the error report in my scenario.

Solution

  1. Deleting the node_modules folder and package-lock.json file
    information is precious, please make sure that there is no important information that needs to be used in the file and folder before deleting

insert image description here

  1. Execute the following code on the command line to read the configuration of the installed package.json
npm i

or

npm install

Both commands are the same, except that one is abbreviated.
3. Waiting for the build insert image description here
If the download of the build is found to be stuck or very slow, it is recommended to replace the npm mirror.
I heard that the address of the Taobao mirror has been changed, as shown in the figure below, insert image description here
the new mirror address is:

http://npmmirror.com
http://registry.npmmirror.com
  1. After the build is successful, you can perform the next steps
    problem solved

Guess you like

Origin blog.csdn.net/Coco94joker/article/details/128125832