webpack: Error when trying to build bundle after upgrading to `4.20.0`
Bug report
What is the current behavior? When trying to build a js bundle and publish like we used to, webpack reported this error: /Users/***/Documents/work/repos/mobile-web/node_modules/webpack-cli/bin/config-yargs.js:89 describe: optionsSchema.definitions.output.properties.path.description, ^
TypeError: Cannot read property ‘properties’ of undefined
If the current behavior is a bug, please provide the steps to reproduce. it’s hard to give u the exact webpack.config.js because it our company’s project. But after analyze the problem, i find out that the problem may happen when webpack-cli@2.1.5 trying to work with webpack@4.20.0, some json may be not compatible with the older version. And after i downgrade my webpack to webpack@4.18.1, then there won’t be any error and the building can be done correctly.
What is the expected behavior?
Other relevant information: webpack version: 4.20.0 Node.js version: v10.8.0 Operating System: mac os high sierra 10.13.4 Additional tools:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 60
- Comments: 21 (6 by maintainers)
Links to this issue
Commits related to this issue
- Update webpack-cli due to: https://github.com/webpack/webpack/issues/8082 — committed to xchem/fragalysis-frontend by invalid-email-address 6 years ago
- :arrow_up: devDependencies https://github.com/webpack/webpack/issues/8082 — committed to thierrymichel/kapla by thierrymichel 6 years ago
- Fix https://github.com/webpack/webpack/issues/8082 Change-Id: I553249cbd83bec1abcac19fbc7ce1f9a7e2358f3 Signed-off-by: Florent BENOIT <fbenoit@redhat.com> — committed to eclipse-theia/theia-generator-plugin by benoitf 6 years ago
- Fix https://github.com/webpack/webpack/issues/8082 Change-Id: I553249cbd83bec1abcac19fbc7ce1f9a7e2358f3 Signed-off-by: Florent BENOIT <fbenoit@redhat.com> — committed to eclipse-theia/theia-generator-plugin by benoitf 6 years ago
- merge xchem changes (#26) * Update to v4.20.0 of webpack * Update webpack-cli due to: https://github.com/webpack/webpack/issues/8082 — committed to ricgillams/fragalysis-frontend by ricgillams 6 years ago
- fixed build failing because of https://github.com/webpack/webpack/issues/8082 — committed to medicomdev/cornerstoneWADOImageLoader by Djeisen642 6 years ago
- chore(webpack): Fixed failing build (#222) * fixed build failing because of https://github.com/webpack/webpack/issues/8082 * used yarn instead of npm, making ci fail — committed to cornerstonejs/cornerstoneWADOImageLoader by jssuttles 6 years ago
- Bump webpack-cli to v3.1 webpack v4.20 introduce a change making webpack-cli v2 unusable. Check: webpack/webpack#8082. — committed to redeyes2015/source-map by redeyes2015 6 years ago
- Fixes broken webpack version dependency (see https://github.com/webpack/webpack/issues/8082) — committed to dat-ecosystem-archive/dat-desktop by dkastl 6 years ago
- Fixes broken webpack version dependency (see https://github.com/webpack/webpack/issues/8082) — committed to dat-ecosystem-archive/dat-desktop by dkastl 6 years ago
- build(docs-infra): upgrade webpack-cli to 3.1.2 This is necessary to avoid webpack/webpack#8082, when installing dependencies without taking the lockfile into account (e.g. with `yarn aio-use-local` ... — committed to gkalpak/angular by gkalpak 6 years ago
- build(docs-infra): upgrade webpack-cli to 3.1.2 This is necessary to avoid webpack/webpack#8082, when installing dependencies without taking the lockfile into account (e.g. with `yarn aio-use-local` ... — committed to gkalpak/angular by gkalpak 6 years ago
- build(docs-infra): upgrade webpack-cli to 3.1.2 This is necessary to avoid webpack/webpack#8082, when installing dependencies without taking the lockfile into account (e.g. with `yarn aio-use-local` ... — committed to gkalpak/angular by gkalpak 6 years ago
- build(docs-infra): upgrade webpack-cli to 3.1.2 This is necessary to avoid webpack/webpack#8082, when installing dependencies without taking the lockfile into account (e.g. with `yarn aio-use-local` ... — committed to gkalpak/angular by gkalpak 6 years ago
- Bump `webpack-cli` version to 3.1.2 * This fixes an incompatability in webpack version 4.20.0: https://github.com/webpack/webpack/issues/8082 — committed to Ameobea/Tone.js by Ameobea 6 years ago
- Bump `webpack-cli` version to 3.1.2 (#394) * This fixes an incompatability in webpack version 4.20.0: https://github.com/webpack/webpack/issues/8082 — committed to Tonejs/Tone.js by Ameobea 6 years ago
- build(docs-infra): upgrade webpack-cli to 3.1.2 This is necessary to avoid webpack/webpack#8082, when installing dependencies without taking the lockfile into account (e.g. with `yarn aio-use-local` ... — committed to gkalpak/angular by gkalpak 6 years ago
- build(docs-infra): upgrade webpack-cli to 3.1.2 This is necessary to avoid webpack/webpack#8082, when installing dependencies without taking the lockfile into account (e.g. with `yarn aio-use-local` ... — committed to gkalpak/angular by gkalpak 6 years ago
- Revert to webpack version 4.19.0 due to problems with 4.20.0 https://github.com/webpack/webpack/issues/8082 — committed to Logiscool/scratch-blocks by ajuhos 6 years ago
- Update webpack-cli, add shrinkwrap webpack/webpack#8082 https://docs.npmjs.com/cli/shrinkwrap — committed to qedsoftware/kpi by mlazowik 6 years ago
Please read
CHANGELOG
https://github.com/webpack/webpack/releases/tag/v4.20.0Solution: upgrade
webpack-cli
to3.1.1
. Thanks for usingwebpack
.We had a same issue, when we had webpack combined with webpack-cli. Solved by using 4.19.1
Please update
webpack-cli
to latest version and usewebpack-cli@3
forwebpack@4
.You can also use 4.19.0 We have also noticed our builds were broken today (yesterday everything was fine) so it’s exactly the problem with update to 4.20.0
I am still having this issue with the following:
For reference, my
npm outdated
ouput is:Is there a ‘definitive’ solution to this issue at this stage?
Maybe update
webpack-cli
to3.2.3
?Like this?
Or maybe this?
Thank you.
Edit: I am no expert, but this seemed to work for me:
I’m unhappy with the proposed solution because
A patch with backwards compatibility would be great. 👍
Making a mistake is one thing, but letting this continue to break people’s applications for more than 2 months seems irresponsible.
https://github.com/webpack/webpack/issues/8450
Same here
Works after update of webpack-cli to latest!
While technically correct, this version update caused a breaking change what is by far the most common configuration where Webpack is used–alongside the CLI. As indicated by all the linked issues above, this caused some majors issues for a large number of people, including some of our customers! Is there any way a patch version can be published with backwards-compatibility with the previous version of the webpack-cli?