Skip to content

angular-cli: 1.0.0-beta.11-webpack.8: Uncaught TypeError: Cannot read property 'Emulated' of undefined in config.js:15 #2065

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

Closed
richavyas opened this issue Sep 12, 2016 · 7 comments

Comments

@richavyas
Copy link

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Mac OSX (Yosemite)
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.11-webpack.8
    node: 6.1.0
    os: darwin x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    Router upgraded to rc.6
    Followed this doc https://github.com/angular/angular-cli/blob/master/WEBPACK_UPDATE.md
    to upgrade my current project to use angular-cli@webpack to run the app.
    ng serve
  4. The log given by the failure. Normally this include a stack trace and some more information.
    Version: webpack 2.1.0-beta.21
    webpack: bundle is now VALID.
    Browser @ http://localhost:4200/ shows Uncaught TypeError: Cannot read property 'Emulated' of undefined in config.js:15
  5. Mention any other details that might be useful.
    I did this upgrade last night so assuming it should pick the latest which was pushed to master 4 days back.

Thanks! We'll be in touch soon.

@ShadowManu
Copy link

ShadowManu commented Sep 12, 2016

The fix was reported to be using webpack beta.22. Guess there's your answer.

@richavyas
Copy link
Author

According to official doc, I run npm install -g angular-cli@webpack and it installs
"angular-cli": "^1.0.0-beta.11-webpack.8", doesn't matter what version of webpack it's using. Not sure if we should install a specific version of webpack first and then install angular-cli

@ShadowManu
Copy link

For now you must. The fix for it is only available on master (yet to be released on npm)

@richavyas
Copy link
Author

So I tried this:

  • updated local package.json
  • uninstalled Webpack
  • reinstalled webpack beta 22
  • updated complete Node Modules

But, when I run ng serve, it eventually shows Webpack version as Version: webpack 2.1.0-beta.21, doesn't matter my local package.json and even npm list include "webpack": "2.1.0-beta.22".

Absolutely clueless what to do.

@richavyas
Copy link
Author

richavyas commented Sep 13, 2016

Finally got the ng serve working by doing this:

this will update webpack installation in angular-cli and angular-cli will stop picking beta 21 internally.

Hence, closing the issue.

@jtsom
Copy link
Contributor

jtsom commented Sep 13, 2016

Why is it insisting on installing beta.21?? The package.json file in the angular-cli folder specifies beta.22? Why should I have to fix their code?

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants