Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
This repository was archived by the owner on May 22, 2025. It is now read-only.

Unable to upgrade to angular 8.2 #1048

Closed

Description

@internalsystemerror

Not sure if this is a bug with ng update or this package...

This package has a dev peer requirement of typescript ~3.4.1. I have installed angular 8.1.3. I run ng update @angular/cli @angular/core and get:

Using package manager: 'yarn'
Collecting installed dependencies...
Found 44 dependencies.
Fetching dependency metadata from registry...
                  Package "tsickle" has an incompatible peer dependency to "typescript" (requires "~3.4.1", would install "3.5.3").
Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.

Not sure why the dev requirement in tsickle's package.json is being used? (I've just seen that there is a peer dependency also) Should this be ^3.4 instead of ~3.4?

Activity

  1. matheo commented on Aug 1, 2019

    @matheo

    I had to force my upgrade of @angular/core but I need to confirm that tsickle has no issues with typescript 3.5.3

  2. Arikael commented on Aug 8, 2019

    @Arikael

    as far as I know ^3.4 won't work because Typescript introduces breaking changes in minor version changes as described here -> angular/angular#26290 (comment)

    But I also like to know when we can update our library.

    Maybe you don't need tsickle at all -> https://medium.com/@devversion/angular-import-shorthands-ecc7c51bcd08

  3. added a commit that references this issue on Aug 16, 2019
  4. devin5885 commented on Aug 20, 2019

    @devin5885

    This appears to still be an issue, npm is still installing the version that has the peer dependency on typescript 3.4.1.

    Anyone know when a version compatible with Angular 8 will be released?

  5. alexeagle commented on Aug 22, 2019

    @alexeagle
    Contributor

    Unless you're using google's Closure compiler to optimize your JavaScript, you should not have a dependency on tsickle. We did a pass to remove that dependency from Angular and Angular CLI packages (@angular/bazel is the only package I know of that still lists the dependency).

    Can you help us track down where the dependency is coming from?

  6. mscudlik commented on Aug 23, 2019

    @mscudlik

    this is actually coming from angular cli when you create a library and automatically added to package.json of the project:

    ng new test-lib <- not yet there
    cd test-lib
    ng generate library my-lib <- this will add it

    angular-cli@8.3.0

    image

    since angular cli 8.3.0 uses typescript 3.5 now and generating the library adds tsickle 0.3.6 this is actually an incompatible dependency

    If i remove tsickle manually, ng build will not run anymore:

    image

  7. alan-agius4 commented on Aug 23, 2019

    @alan-agius4
    Contributor

    @alexeagle we had to add back tsickle in the CLI for libraries because of TDZ in ES2015 caused by forwardRef.

    PR: angular/angular-cli#14473

    An option to remove the tsickle dependency completely in the CLI would be to add to copy the decorator_downlevel_transformer in ng-packagr, similar to what has been done in @ngtools/webpack.

    Alternatively I can help update tsickle to support TS 3.5, If someone from the team creates a 3.5 branch.

    Though with the former, bug fixes for bugs such as angular/angular-cli#15429 in the transformer will be to be synced in at least 3 places.

  8. alexeagle commented on Aug 23, 2019

    @alexeagle
    Contributor

    thanks @alan-agius4 makes sense.
    When @clydin added the downlevel transformer in @ngtools/webpack we knew it was the wrong layering - I think we wanted to make it a TS transformer and run it as part of ngc/ngtsc but that was a more complex rollout.
    #1049 adds TS 3.5 and was merged a week ago, looks like we just need a release

  9. alexeagle commented on Aug 23, 2019

    @alexeagle
    Contributor

    https://www.npmjs.com/package/tsickle/v/0.37.0 published with

    "peerDependencies": {
        "typescript": "~3.5.3"
      },
    
  10. alan-agius4 commented on Aug 23, 2019

    @alan-agius4
    Contributor

    Thanks @alexeagle will lend a pr to update the tsickle dependency in the CLI in next hour or so.

  11. alan-agius4 commented on Aug 23, 2019

    @alan-agius4
    Contributor
  12. CodeSwimBikeRunner commented on Apr 13, 2021

    @CodeSwimBikeRunner

    This exists today with a new typescript version dependency mismatch on tsickle. A brand new ng 8 application, upgrading to ng 9 caused this issue. I am worried this impacts ability to generate new libraries/components in a vscode.

    Using package manager: 'npm'
    Collecting installed dependencies...
    Found 33 dependencies.
    Fetching dependency metadata from registry...
                      Package "tsickle" has an incompatible peer dependency to "typescript" (requires "~3.6.4", would install "3.8.3").
    
  13. mprobst commented on Apr 13, 2021

    @mprobst
    Contributor
  14. matheo commented on Apr 13, 2021

    @matheo

    If we're using ng-packagr to build libraries, we need to match the right tsickle version.
    The last time I had to do this manually with a fixes version (not using ^ or ~ in the package.json)

  15. alan-agius4 commented on Apr 13, 2021

    @alan-agius4
    Contributor

    @matheo, please don’t use tsickle unless you explicitly need to support closure compiler.

    Since version 8 using tsickle with Angular is not recommended and users using ng-packagr with Angular CLI were migrated off this path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions