Skip to content

Updating to 1.0.0-beta.18 issue #2808

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
hassanasad opened this issue Oct 20, 2016 · 12 comments
Closed

Updating to 1.0.0-beta.18 issue #2808

hassanasad opened this issue Oct 20, 2016 · 12 comments

Comments

@hassanasad
Copy link

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?

@grizzm0
Copy link
Contributor

grizzm0 commented Oct 20, 2016

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.

@hassanasad
Copy link
Author

hassanasad commented Oct 21, 2016

@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 :(

@antonybudianto7
Copy link

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

@hassanasad
Copy link
Author

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

@hassanasad
Copy link
Author

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.

@tomwanzek
Copy link

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

@hassanasad
Copy link
Author

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

@hassanasad hassanasad reopened this Oct 21, 2016
@tomwanzek
Copy link

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

@jmlivingston
Copy link

jmlivingston commented Oct 22, 2016

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

@chumtoadafuq
Copy link

chumtoadafuq commented Oct 25, 2016

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.

@filipesilva
Copy link
Contributor

Fixed by #2870

@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

7 participants