When you run webpack, this error occurs, how to fix it?

mistake

package.json

{ "name": "Project", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack --mode production --progress -p", "buildDev": "webpack --mode development --progress -p", "watch": "webpack --mode production --progress --watch", "watchDev": "webpack --mode development --progress --watch" }, "author": "ekrit", "license": "ISC", "dependencies": { "jquery": "^3.3.1", "imagemin-webpack-plugin": "^2.1.5" }, "devDependencies": { "@babel/core": "^7.0.0-beta.44", "@babel/preset-env": "^7.0.0-beta.44", "autoprefixer": "^8.3.0", "babel-loader": "^8.0.0-beta.2", "copy-webpack-plugin": "^4.5.1", "css-loader": "^0.28.11", "extract-text-webpack-plugin": "^4.0.0-beta.0", "file-loader": "^1.1.5", "image-webpack-loader": "^3.4.2", "node-sass": "^4.8.3", "postcss-loader": "^2.1.4", "resolve-url-loader": "^2.3.0", "sass-loader": "^7.0.1", "style-loader": "^0.21.0", "webpack": "^4.6.0", "webpack-cli": "^2.0.15" } } 

  • Check the output property in the webpack.config.js - DiDex
  • @DiDex seems to be all normal there: jsfiddle - Yaroslav Kurov
  • @DiDex, where is the output if this optional property + error crashes due to webpack-cli? - overthesanity
  • @YaroslavKurov, you are using an outdated version of webpack-cli , with the release of webpack> = 4 - released and cli 3 versions, upgrade the package - overthesanity
  • @overthesanity yes, it helped, thanks. - Yaroslav Kurov

0