Is there any reason that angular-cli depends on typescript strictly lower than 2.2 for angular 4?
If I understood right, there was no breaking changes in 2.2 (in opposition to 2.1 that had a breaking change with 2.0, which was the reason why we are blocked with 2.0 in angular 2) so there is no reason to restrict ourselves to 2.1, right?
I did some tests on my code and everything seems to be fine for now…
Angular 2.2 support is also top of my list for what I want for angular 4
This sort of stuff usually relies on the official support statement.
Also there's no guarantee that TS 2.3 won't come and break existing projects as well.
As long as Angular 4 explicitly mentions TS 2.1, that will be what the CLI will include by default.
The CLI doesn't mind if you change the version in your own project. Everything should be the same if it doesn't have a breaking change.
@Meligy ok :)
I asked because when you use yarn (I don't know for npm), it will install typescript 2.2 in the ./node_modules/typescript and typescript 2.1 in ./@angular/cli/node_modules/typescript to satisfy both requirements.
We were letting the dust settle around 2.2 for a bit, only using it on the CLI itself. I'll make a PR to update the ng4 projects and we'll see.
@filipesilva What TypeScript version should a new RC2 project be on?
I just went through the RC upgrade and with angular/cli: 1.0.0-rc.2
The package.json generated for a ng new project has:
"typescript": "~2.0.0"
So I'm on TypeScript 2.0.10
Is this correct? Or should RC2 be using a higher version of TypeScript?
@arlowhite it depends on the Angular version.
For angular 2.x.x, you should have TypeScriot 2.0.x, for Angular 4, you should end up with 2.1.x if you want to play safe (default), or 2.x.x if you are ambitious (currently 2.2.x seems safe).
Typescript ~2.2.1 is breaking serve for me on new/existing projects.
start a project: ng new bugts --ng4 --style=scss
upgrade typescript: "typescript": "~2.2.1"
do yarn install and ng serve --aot returns:

npm install works fine.
@angular/cli rc.4. node 7.7.2, osx latest, yarn 0.21.3
i have cleared yarn cache and tried again. no luck there.
@scttcper for me it works flawlessly. The only problem I noticed (and it is only happening with yarn) is that some things (I think it is angular-cli so it would make sense with your problem) depends on typescript 2.1 and others on typescript 2.2, so I had to manually force the resolution of typescript 2.1 to the 2.2 version in the yarn.lock for yarn to only use typescript 2.2.
And that's why I opened this issue originally, so that this situation does not arise :)
Gotcha, manually changing yarn.lock to have only typescript 2.2.x does fix it for me as well. Gross! 😉
@scttcper actually, I had to do it also to be able to have only one version of the @angular dependencies (it was bringing both v2 and v4 in some places…) :)
@victornoel I didn't have to do that for my 4.x project but i've opened #5557
I guess we're stuck waiting for angular 4 to be the default for angular-cli. #5586 The team notes said that final version could be thursday, but I'm not sure if that means v4 will be default.
This is fixed with @angular/cli v1
Yep, thanks @scttcper
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
@scttcper for me it works flawlessly. The only problem I noticed (and it is only happening with yarn) is that some things (I think it is angular-cli so it would make sense with your problem) depends on typescript 2.1 and others on typescript 2.2, so I had to manually force the resolution of typescript 2.1 to the 2.2 version in the
yarn.lockfor yarn to only use typescript 2.2.And that's why I opened this issue originally, so that this situation does not arise :)