New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to build bundle after upgrading to `4.20.0` #8082

Closed
pfncfen opened this Issue Sep 25, 2018 · 20 comments

Comments

Projects
None yet
@pfncfen
Copy link

pfncfen commented Sep 25, 2018

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:

@llech

This comment has been minimized.

Copy link

llech commented Sep 25, 2018

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

@phouri

This comment has been minimized.

Copy link

phouri commented Sep 25, 2018

Same, broke my builds...

@hxykjc

This comment has been minimized.

Copy link

hxykjc commented Sep 25, 2018

same issue

@mstaniuk

This comment has been minimized.

Copy link

mstaniuk commented Sep 25, 2018

Same here

[bundle] /usr/src/app/node_modules/webpack-cli/bin/config-yargs.js:89
[bundle] describe: optionsSchema.definitions.output.properties.path.description,
[bundle] ^
[bundle]
[bundle] TypeError: Cannot read property 'properties' of undefined
[bundle] at module.exports (/usr/src/app/node_modules/webpack-cli/bin/config-yargs.js:89:48)
[bundle] at /usr/src/app/node_modules/webpack-cli/bin/webpack.js:60:27
[bundle] at Object. (/usr/src/app/node_modules/webpack-cli/bin/webpack.js:515:3)
[bundle] at Module._compile (internal/modules/cjs/loader.js:689:30)
[bundle] at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
[bundle] at Module.load (internal/modules/cjs/loader.js:599:32)
[bundle] at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
[bundle] at Function.Module._load (internal/modules/cjs/loader.js:530:3)
[bundle] at Module.require (internal/modules/cjs/loader.js:637:17)
[bundle] at require (internal/modules/cjs/helpers.js:20:18)

@evilebottnawi

This comment has been minimized.

Copy link
Member

evilebottnawi commented Sep 25, 2018

Please create minimum reproducible test repo.

@robcolclough1

This comment has been minimized.

Copy link

robcolclough1 commented Sep 25, 2018

4.18.0 solved our issue. We were facing it on a windows server machine but we never had the issue on Windows 10

@lroszak

This comment has been minimized.

Copy link

lroszak commented Sep 25, 2018

We had a same issue, when we had webpack combined with webpack-cli.
Solved by using 4.19.1

"webpack": "4.19.1",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-cli": "^2.1.4",
"webpack-merge": "^4.1.2"
@JakubSetera

This comment has been minimized.

Copy link

JakubSetera commented Sep 25, 2018

I experience the same issue when running webpack-cli.
Webpack-cli expects 'optionsSchema.definitions.output.properties.path.description' but the new 4.20 webpack changed it to 'optionsSchema.definitions.outputoptions.properties.path.description'.
Works rolling back to a previous version.

@evilebottnawi

This comment has been minimized.

Copy link
Member

evilebottnawi commented Sep 25, 2018

Please update webpack-cli to latest version and use webpack-cli@3 for webpack@4.

@JakubSetera

This comment has been minimized.

Copy link

JakubSetera commented Sep 25, 2018

Works after update of webpack-cli to latest!

@mstaniuk

This comment has been minimized.

Copy link

mstaniuk commented Sep 25, 2018

Here's example:
https://github.com/mstaniuk/w4.20.0mrt

Edit:
Updating webpack-cli seems to fix this issue.

Edit:
Nevertheless with default settings of npm (without exact-save = true) build gets corrupted automatically since webpack-cli is major update and webpack 4.20.0 is not.

@evilebottnawi

This comment has been minimized.

Copy link
Member

evilebottnawi commented Sep 25, 2018

Please read CHANGELOG https://github.com/webpack/webpack/releases/tag/v4.20.0

  • Update internal structure of options schema to generate typings
    • Note: this exposed an issue in webpack-cli, you need to upgrade to webpack-cli@3.1.1

Solution: upgrade webpack-cli to 3.1.1. Thanks for using webpack.

@llech

This comment has been minimized.

Copy link

llech commented Sep 25, 2018

I'm unhappy with the proposed solution because

  1. it introduces breaking change on minor version update
  2. updating webpack-cli forces me to add dependency to deprecated (!) babel-preset-es2015. With older webpack-cli the build was happy with babel-preset-env which is recommended on their page (https://www.npmjs.com/package/babel-preset-es2015)
@evilebottnawi

This comment has been minimized.

Copy link
Member

evilebottnawi commented Sep 25, 2018

@llech

  1. it is bug in webpack-cli, not in webpack (so no need to use major release)
  2. webpack-cli don't use babel-preset-es2015 dep (please check your lock file to determine who installed babel-preset-es2015)

abradle pushed a commit to xchem/fragalysis-frontend that referenced this issue Sep 25, 2018

thierrymichel added a commit to thierrymichel/kapla that referenced this issue Sep 26, 2018

@RohanAsmat

This comment has been minimized.

Copy link

RohanAsmat commented Sep 26, 2018

Downgrading from 4.20 back works :
"webpack": "4.19.1",
"webpack-cli": "2.1.4",

benoitf added a commit to eclipse/theia-generator-plugin that referenced this issue Sep 26, 2018

Fix webpack/webpack#8082
Change-Id: I553249cbd83bec1abcac19fbc7ce1f9a7e2358f3
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
@evilebottnawi

This comment has been minimized.

Copy link
Member

evilebottnawi commented Sep 26, 2018

@RohanAsmat you can't upgrade to next version, it is bad idea

benoitf added a commit to eclipse/theia-generator-plugin that referenced this issue Sep 26, 2018

Fix webpack/webpack#8082
Change-Id: I553249cbd83bec1abcac19fbc7ce1f9a7e2358f3
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>

ricgillams added a commit to ricgillams/fragalysis-frontend that referenced this issue Sep 26, 2018

merge xchem changes (#26)
* Update to v4.20.0 of webpack
* Update webpack-cli due to: webpack/webpack#8082
@ematipico

This comment has been minimized.

Copy link

ematipico commented Sep 26, 2018

Related to this: webpack/webpack-cli#607

mrstegeman added a commit to mozilla-iot/gateway that referenced this issue Oct 24, 2018

Upgrade webpack-cli (#1412)
* Upgrade webpack-cli

This avoids the errors described in webpack/webpack#8082

* Add a devDependency for babel-preset-es2015

It is required by gateway's .babelrc.  Also note that modules cannot be
excluded in the test environment (see
https://jestjs.io/docs/en/webpack.html#using-with-webpack-2)

tobek added a commit to joincivil/civil-publisher-wordpress-plugin that referenced this issue Oct 28, 2018

Update webpack-cli to fix build
CI or new install gets later version of `webpack` which is vulnerable to this `webpack-cli` bug webpack/webpack#8082

alexanderwe added a commit to alexanderwe/checksum-validator that referenced this issue Oct 28, 2018

pkwenda added a commit to pkwenda/new-bee that referenced this issue Nov 1, 2018

leighman added a commit to leighman/DeBitpay that referenced this issue Nov 10, 2018

bengourley added a commit to bugsnag/bugsnag-js that referenced this issue Nov 12, 2018

test(browser): Fix webpack based tests
There seemed to be an issue with specific versions of webpack-cli and webpack working
together:
webpack/webpack#8082

simeonackermann added a commit to AKSW/building-navigator that referenced this issue Nov 28, 2018

@trusktr

This comment has been minimized.

Copy link

trusktr commented Dec 3, 2018

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.

#8450

FrederikSchlemmer added a commit to FrederikSchlemmer/angular that referenced this issue Jan 3, 2019

build(docs-infra): upgrade webpack-cli to 3.1.2 (angular#26202)
This is necessary to avoid webpack/webpack#8082, when installing
dependencies without taking the lockfile into account (e.g. with
`yarn aio-use-local` - locally or on CI).

PR Close angular#26202

alex-wdmg added a commit to alex-wdmg/lightbox that referenced this issue Jan 9, 2019

Webpack version to 4.19.1
Fix build issue: Cannot read property 'properties' of undefined
webpack/webpack#8082
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment