How to fix WebPack error describe: optionsSchema.definitions.output.properties.path.description
Problem:
You are trying to build your webpack project, but you see an error message like this:
/home/uli/project/node_modules/webpack-cli/bin/config-yargs.js:89
describe: optionsSchema.definitions.output.properties.path.description,
^
TypeError: Cannot read property 'properties' of undefined
at module.exports (/home/uli/project/node_modules/webpack-cli/bin/config-yargs.js:89:48)
at /home/uli/project/node_modules/webpack-cli/bin/webpack.js:60:27
at Object.<anonymous> (/home/uli/project/node_modules/webpack-cli/bin/webpack.js:515:3)
at Module._compile (internal/modules/cjs/loader.js:723:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:659:17)
at require (internal/modules/cjs/helpers.js:22:18)
Solution
This is a known bug in webpack 4.20.0
- you can circumvent this issue by using webpack 4.19.0
.
Look for a line like
"webpack": "^4.7.0",
in your package.json
. The caret (^
) allows npmto use any 4.x.x version - including the broken 4.20.0
.
Replace the aforementioned line by
"webpack": "4.19.0",
to use only webpack 4.19.0
.
After that, run npm install
and retry building your application.