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?
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.
ng new dummy command. devDependency section. src/typings.d.ts file into my project. node_modules foldernpm iNow 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:
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._
Most helpful comment
Ok its working now.
ng new dummycommand.devDependencysection.src/typings.d.tsfile into my project.node_modulesfoldernpm iNow 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/nodewas missing.