Angular-cli: Updating to 1.0.0-beta.18 issue

Created on 20 Oct 2016  路  12Comments  路  Source: angular/angular-cli

OS?

MacOS Seirra

I just updated my local angular-cli version from 1.0.0-beta.17 to 1.0.0-beta.18

Now its giving this error on All ng commands:

It seems like you're using a project generated using an old version of the Angular CLI.
The latest CLI now uses webpack and includes a lot of improvements, include a simpler
workflow, a faster build and smaller bundles.

To get more info, including a step-by-step guide to upgrade the CLI, follow this link:
https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.12

Anyone facing similar issues?

Most helpful comment

Ok its working now.

  • I created a new project in another directory using ng new dummy command.
  • Updated/added some of the packages in the devDependency section.
  • Updated my angular-cli.json file and matched it with the dummy project's structure.
  • Copied the src/typings.d.ts file into my project.
  • Removed node_modules folder
  • npm i

Now its working as expected :)

P.S: Seems to me either there was something missing in angular-cli.json file or a devDependency such as @types/node was missing.

All 12 comments

Are you sure you had this working with beta 17? Sounds like your project was created using beta 10 (pre-webpack). If so, you need to upgrade using the article linked.

To upgrade between recent versions you can run ng init. This will ask you to overwrite, diff or skip any changes between your project and the latest blueprints.

@grizzm0 yeah, it was working fine with beta 17. I was just waiting for the assets array implementation in beta 18 (you helped me in that thread as well :))

Yeah - my project started when it was pre-webpack versions. However i upgraded with each new update and was on 17 last.

If i revert it back to 17 it still works - but i need the 18

I cannot run ng init because all ng commands give the error in my first comment :(

my workaround is changing the angular-cli version directly in package json and do npm i, then try ng init again

thats what i do always :) Didn't work this time though

Ok its working now.

  • I created a new project in another directory using ng new dummy command.
  • Updated/added some of the packages in the devDependency section.
  • Updated my angular-cli.json file and matched it with the dummy project's structure.
  • Copied the src/typings.d.ts file into my project.
  • Removed node_modules folder
  • npm i

Now its working as expected :)

P.S: Seems to me either there was something missing in angular-cli.json file or a devDependency such as @types/node was missing.

@hassanasad I just updgraded from beta.17 to beta.18 and I have the same issue: ng init is not working.

angular-cli: 1.0.0-beta.18
node: 6.5.0
os: win32 x64

While I appreciate your work-around from above (I will try it shortly), I don't think this issue should be closed. Quite to the contrary, it should be elevated in priority for actual resolution w/o work-around.

I have consistently been able to upgrade from beta.15 -> beta.16 -> beta.17. Minimal effort, never had an issue with ng init. Simply loved it.

This is the first time, I encountered a problem, so there probably should be a more 'at the root' solution w/o a need for a work-around.

@tomwanzek I thought there was something wrong with only my install as no one seemed to be facing it. I will reopen it now - Probably someone more experienced can have a better look at this.

Alright, so I went back over it and it worked now (roughly as previously) I will note that, I got a message that the --link-cli option is not supported. No longer I suppose? Will have to test things out by migrating another project, when I have a minute.

So, not sure, why I did not get ng init to work the first time around. Apologies, must have just been a crazy day today...

I had the same problem and had started with beta 15, though I was able to work around it. I believe I may have caused it by two things:

  1. I had upgraded Angular to 2.1.0.
  2. I have been experimenting with Yarn package manager instead of npm.

My solution was reverting Angular back to 2.0.0, and exclusively using npm per the upgrade steps.

https://github.com/angular/angular-cli#updating-angular-cli

Also having this same problem when going from beta16 to beta18.

angular-cli: 1.0.0-beta.18
node: 6.2.1
os: win32 x64

None of the ng commands work, so the upgrade steps can't be followed.

Edit: I followed the workaround steps provided by hassanasad on 21/Oct, with the addition of running "ng init" at the end to update the project files... that worked for me, but shouldn't be necessary.

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._

Was this page helpful?
0 / 5 - 0 ratings