Skip to content

Following the upgrade guide from 7 to 8 fails on Windows #17432

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
un33k opened this issue Apr 9, 2020 · 4 comments
Closed

Following the upgrade guide from 7 to 8 fails on Windows #17432

un33k opened this issue Apr 9, 2020 · 4 comments
Labels
freq1: low Only reported by a handful of users who observe it rarely needs: investigation Requires some digging to determine if action is needed severity3: broken type: bug/fix
Milestone

Comments

@un33k
Copy link

un33k commented Apr 9, 2020

🐞 Bug report

Command

  • [ x ] update

Is this a regression?

No

Description

Was unable to find an existing issue for the bug I am reporting. is:issue, is:open, is:close.
Following the online update guideline, and yet unable to move forward with a simple ng update.

🔬 Minimal Reproduction

Private "corporate code" unable to reproduce on a minimal version. However, I am attaching an image to show the anomaly.

🔥 Exception or Error


$ ng update @angular/[email protected]
The installed Angular CLI version is older than the latest stable version.
Installing a temporary version to perform the update.
Installing packages for tooling via yarn.
Installed packages for tooling via yarn.
Using package manager: 'yarn'
Collecting installed dependencies...
Found 0 dependencies.
Package '@angular/core' is not a dependency.

🌍 Your Environment


Angular CLI: 8.3.26
Node: 10.16.3
OS: win32 x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.9
@angular-devkit/build-angular     0.13.9
@angular-devkit/build-optimizer   0.13.9
@angular-devkit/build-webpack     0.13.9
@angular-devkit/core              8.3.26
@angular-devkit/schematics        8.3.26
@angular/cdk                      7.3.2
@angular/cli                      8.3.26
@angular/flex-layout              7.0.0-beta.24
@angular/http                     7.2.16
@angular/material                 7.3.2
@ngtools/webpack                  7.3.9
@schematics/angular               8.3.26
@schematics/update                0.803.26
rxjs                              6.5.4
typescript                        3.2.4
webpack                           4.29.0

Anything else relevant?
Windows 10, The plan is to update from 7 to 9, via 8.

Ng7to8

@alan-agius4
Copy link
Collaborator

Hi @un33k, thanks for reporting this issue.

However, we will need a reproduction to look into this, the screenshots alone don’t provide enough information to reproduce the problem.

Thanks.

@alan-agius4 alan-agius4 added the needs: repro steps We cannot reproduce the issue with the information given label Apr 9, 2020
@un33k
Copy link
Author

un33k commented Apr 11, 2020

Ok, I think I have figured out the steps ... and it may be repo independent.

  1. Create a repo with ng/cli 7.x.x (& npm install)
  2. Run: node --max_old_space_size=2000 /usr/local/bin/ng update @angular/cli@8 @angular/core@8 --force (We want to simulated an out of heap memory)
  3. Verify that above node command runs out of heap memory
  4. Run: node --max_old_space_size=12000 /usr/local/bin/ng update @angular/cli@8 @angular/core@8 --force (Give it plenty of memory)
  5. Verify that the command now fails right away with Package '@angular/core' is not a dependency.
  6. Remove node_modules && npm install
  7. Run: node --max_old_space_size=12000 /usr/local/bin/ng update @angular/cli@8 @angular/core@8 --force
  8. Verify it no longer fails with the Package '@angular/core' is not a dependency. error.

So, the proper fix would be to not fail with Package '@angular/core' is not a dependency. if we run the update command again right after a heap memory error.

@alan-agius4 alan-agius4 added comp: schematics/update freq1: low Only reported by a handful of users who observe it rarely needs: investigation Requires some digging to determine if action is needed severity3: broken type: bug/fix and removed needs: repro steps We cannot reproduce the issue with the information given labels Apr 13, 2020
@ngbot ngbot bot modified the milestone: Backlog Apr 13, 2020
@clydin
Copy link
Member

clydin commented May 29, 2020

Since the first update command failed, the node_modules directory will most likely be corrupt. The update process checks the node_modules directory for dependencies. If it cannot find it there or it is corrupt then it will present the error message as shown above.
Future improvements to the update command will also support updating without a node modules directory present. This is being tracked here: #17599 & #16020

@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 Jun 29, 2020
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 needs: investigation Requires some digging to determine if action is needed severity3: broken type: bug/fix
Projects
None yet
Development

No branches or pull requests

3 participants