Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng add installs old package versions in 10.0.0-rc.5 #17983

Closed
1 task done
tsvetomir opened this issue Jun 22, 2020 · 5 comments 路 Fixed by #19880
Closed
1 task done

ng add installs old package versions in 10.0.0-rc.5 #17983

tsvetomir opened this issue Jun 22, 2020 · 5 comments 路 Fixed by #19880
Labels
freq1: low Only reported by a handful of users who observe it rarely ng update DX severity1: confusing type: bug/fix
Milestone

Comments

@tsvetomir
Copy link

馃悶 Bug report

Command

  • add

Is this a regression?

Yes, the previous version in which this bug was not present was v9.1.9

Description

ng add installs old versions instead of latest. Managed to reproduce it with both @kendo-angular-buttons (installs v0.10.1) and @angular/material (installs v7.3.7).

馃敩 Minimal Reproduction

  1. npm install -g @angular/cli@next
  2. ng new ng10-project --defaults --skip-git
  3. cd ng10-project
  4. ng add @progress/kendo-angular-buttons

The problem does not occur if we specify a version to be installed, e.g.
ng add @progress/kendo-angular-buttons@latest

馃敟 Exception or Error


The package that you are trying to add does not support schematics. You can try using a different version of the package or contact the package author to add ng-add support.

馃實 Your Environment


Angular CLI: 10.0.0-rc.5
Node: 10.14.0
OS: linux x64

Angular: 10.0.0-rc.6
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.0-rc.5
@angular-devkit/build-angular     0.1000.0-rc.5
@angular-devkit/build-optimizer   0.1000.0-rc.5
@angular-devkit/build-webpack     0.1000.0-rc.5
@angular-devkit/core              10.0.0-rc.5
@angular-devkit/schematics        10.0.0-rc.5
@angular/cli                      10.0.0-rc.5
@angular/platform-server          2.0.0
@ngtools/webpack                  10.0.0-rc.5
@schematics/angular               10.0.0-rc.5
@schematics/update                0.1000.0-rc.5
rxjs                              6.5.5
typescript                        3.9.5
webpack                           4.43.0
@alan-agius4
Copy link
Collaborator

This is because @progress/kendo-angular-buttons latest version doesn't support Angular 10. See: https://unpkg.com/browse/@progress/kendo-angular-buttons@5.4.2/package.json. Since this is an incompatible version, ng update will try to find a version which doesn't have this constraint and is "compatible".

This doesn't happen when using a version tag @latest because you are forcefully installing that particular version.

@tsvetomir
Copy link
Author

Thanks, we'll update the version range to include 10.

Is this a new behavior in v10? Seems convenient, once you know how it works :)
An information message about the chosen version would be nice.

@alan-agius4
Copy link
Collaborator

@tsvetomir, no it鈥檚 not new, it鈥檚 been around for a couple of majors now.

Agreed that an info message would be good in this case.

@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix labels Jun 22, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jun 22, 2020
@shaharkazaz
Copy link

@alan-agius4 I just experienced the same issue with version 10+, but I wasn't able to reproduce in lower versions (tried v9.1.10 & v8.3.19)

clydin added a commit to clydin/angular-cli that referenced this issue Jan 26, 2021
This adds a spinner as well as shows more information regarding what package version was selected to be installed.

Closes angular#17983
clydin added a commit to clydin/angular-cli that referenced this issue Jan 26, 2021
This adds a spinner as well as shows more information regarding what package version was selected to be installed.

Closes angular#17983
clydin added a commit to clydin/angular-cli that referenced this issue Jan 27, 2021
This adds a spinner as well as shows more information regarding what package version was selected to be installed.

Closes angular#17983
alan-agius4 pushed a commit that referenced this issue Jan 28, 2021
This adds a spinner as well as shows more information regarding what package version was selected to be installed.

Closes #17983
@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 Feb 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
freq1: low Only reported by a handful of users who observe it rarely ng update DX severity1: confusing type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants