Skip to content

undefined object. Angular Cli 1.0.0-beta.11-webpack.8 #1885

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
renevall opened this issue Aug 30, 2016 · 5 comments
Closed

undefined object. Angular Cli 1.0.0-beta.11-webpack.8 #1885

renevall opened this issue Aug 30, 2016 · 5 comments

Comments

@renevall
Copy link

renevall commented Aug 30, 2016

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Linux, Ubuntu
  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.5.0
    os: linux x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    After install/update angular cli as in docs
    ng serve
  4. The log given by the failure. Normally this include a stack trace and some
    more information.

Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at Object.getWebpackCommonConfig (/home/reneval/.nvm/versions/node/v6.5.0/lib/node_modules/angular-cli/addon/ng2/models/webpack-build-common.ts:23:25)
at new NgCliWebpackConfig (/home/reneval/.nvm/versions/node/v6.5.0/lib/node_modules/angular-cli/addon/ng2/models/webpack-config.ts:13:30)
at Class.run (/home/reneval/.nvm/versions/node/v6.5.0/lib/node_modules/angular-cli/addon/ng2/tasks/serve-webpack.ts:19:22)
at /home/reneval/.nvm/versions/node/v6.5.0/lib/node_modules/angular-cli/addon/ng2/commands/serve.ts:84:26
at process._tickCallback (internal/process/next_tick.js:103:7)

  1. Mention any other details that might be useful.

Basic code was generated with beta.11-webpack.3

@vkniazeu
Copy link

I just ran into the same error after incorrectly upgrading to angular-cli version 1.0.0-beta.11-webpack.3 (from 2).
I followed all of the steps carefully at https://github.com/angular/angular-cli#updating-angular-cli and the error went away.
As of today, I had to use [email protected] and not @latest to actually get the latest webpack version. I wonder if you are pulling version 8 from master or some place else..
Be careful to review all files that need to be replaced, modified, or skipped during the re-run of the ng init phase in your existing project.

@Daredzik
Copy link

Daredzik commented Aug 30, 2016

fixed id #1887 go for my latest comment there !

@jasonjmitchell
Copy link

I had this same issue. I was able to fix it by adding the line below to the angular-cli.json file.

"scripts": [],

@filipesilva
Copy link
Contributor

These intermediate versions did not have update steps in between them, so it was easy to get stuff broken. Following the instructions in https://github.com/angular/angular-cli#webpack-update should allow you to update projects correctly.

@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

5 participants