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

🐞[add]: error while trying to add performance property #867

Closed
pranshuchittora opened this issue Apr 28, 2019 · 2 comments
Closed

🐞[add]: error while trying to add performance property #867

pranshuchittora opened this issue Apr 28, 2019 · 2 comments

Comments

@pranshuchittora
Copy link
Member

Describe the bug

Throws an error while using add command and trying to add performance property.
Happening only with the current code from the repo, not with the version on the npm.

What is the current behaviour?
Error

 ./node_modules/webpack-cli/bin/cli.js add 

✔ SUCCESS Found config webpack.config.js

? What property do you want to add to? performance
(node:8167) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'definitions' of undefined
    at prompt.then.then (/home/wasd/webpack/webpack-cli/packages/generators/add-generator.js:134:68)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:8167) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8167) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

To Reproduce
Steps to reproduce the behaviour:
(Create a new directory & link the CLI repo)

  1. ./node_modules/webpack-cli/bin/cli.js init
  2. ./node_modules/webpack-cli/bin/cli.js add
  3. Scroll down and select performance
  4. Error

Expected behaviour
Congratulations! performance.assetFilter has been added!

Screenshots

Left = Current codebase
Right = Modules installed from NPM

Screenshot from 2019-04-28 17-47-26

Please paste the results of webpack-cli info here, and mention other relevant information

System:

  • OS: Linux 4.18 Ubuntu 18.10 (Cosmic Cuttlefish)
  • CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  • Memory: 7.53 GB / 15.57 GB

Binaries:

  • Node: 10.12.0 - ~/.nvm/versions/node/v10.12.0/bin/node
  • Yarn: 1.12.3 - /usr/bin/yarn
  • npm: 6.5.0 - ~/.nvm/versions/node/v10.12.0/bin/npm

Browsers:

  • Chrome: 73.0.3683.103
  • Firefox: 66.0.3

npmPackages:

  • terser-webpack-plugin: ^1.2.3 => 1.2.3
  • webpack: ^4.30.0 => 4.30.0
  • webpack-cli: ^3.3.1 => 3.3.0

npmGlobalPackages:

  • webpack-cli: 3.3.0
  • webpack: 4.27.1
@pranshuchittora
Copy link
Member Author

Update

  • Entire add pkg is not working.

Pls, acknowledge if you are also experiencing similar issues. Thank you.

@rishabh3112
Copy link
Member

rishabh3112 commented Apr 29, 2019

Fixed this in my async/await PR :) #843

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

No branches or pull requests

5 participants
@ematipico @rishabh3112 @evenstensberg @pranshuchittora and others