Skip to content
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

Problem of webpack version in webpack example #10237

Closed
dardinier opened this issue Nov 8, 2018 · 0 comments
Closed

Problem of webpack version in webpack example #10237

dardinier opened this issue Nov 8, 2018 · 0 comments
Labels

Comments

@dardinier
Copy link
Contributor

Configuration:

  • Operating system : Debian GNU/Linux 9
  • Node.js : v8.12.0
  • npm : v6.4.1
  • Gulp : v3.9.1

Steps to reproduce the problem:

$ git clone https://github.com/mozilla/pdf.js
$ cd pdf.js
$ npm install
$ gulp dist-install
$ cd examples/webpack
$ npm install
$ ./node_modules/webpack/bin/webpack.js

What is the expected behavior?

Webpack should bundle files.

What went wrong?

Webpack throw an error :

$ ./node_modules/webpack/bin/webpack.js
/home/adardinier/workspace/Test/pdf.js/examples/webpack/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/adardinier/workspace/Test/pdf.js/examples/webpack/node_modules/webpack-cli/bin/config-yargs.js:89:48)
    at /home/adardinier/workspace/Test/pdf.js/examples/webpack/node_modules/webpack-cli/bin/webpack.js:60:27
    at Object.<anonymous> (/home/adardinier/workspace/Test/pdf.js/examples/webpack/node_modules/webpack-cli/bin/webpack.js:515:3)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)

Envisaged solution :

This error comes from Webpack version. As we can see here, the problem can be solved by updating the package.json versions in the webpack example like this :

    "webpack": "^4.20.2",
    "webpack-cli": "^3.1.1",

I tried to change the versions in the package.json and to re-install all the stuff and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants