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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng version take around 3 min to start #21172

Closed
3 of 15 tasks
oshri551 opened this issue Jun 21, 2021 · 7 comments · Fixed by #21184
Closed
3 of 15 tasks

ng version take around 3 min to start #21172

oshri551 opened this issue Jun 21, 2021 · 7 comments · Fixed by #21184
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Milestone

Comments

@oshri551
Copy link

🐞 Bug report

Command ng version

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

started to see this after installing 12.0.4 version but now even when reverting to v11 still see the issue

Description

When trying to do `ng version` or `ng new` it takes almost 3 minutes for the CLI to start

🌍 Your Environment


    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 12.0.5
Node: 14.17.1
Package Manager: npm 6.14.13
OS: win32 x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1200.5 (cli-only)
@angular-devkit/core         12.0.5 (cli-only)
@angular-devkit/schematics   12.0.5 (cli-only)
@schematics/angular          12.0.5 (cli-only)

Anything else relevant?
Tried to remove node and reinstall the npm packages.
Other npm packages works fine

@alan-agius4 alan-agius4 added the needs: more info Reporter must clarify the issue label Jun 22, 2021
@alan-agius4
Copy link
Collaborator

Hi @oshri551,

Can you please provide a CPU profile?

You can generate one by running the below command inside of an Angular workspace

node --cpu-proof node_modules/@angular/cli/lib/init.js version

@oshri551
Copy link
Author

don't know what happened but after running node --cpu-prof node_modules/@angular/cli/lib/init.js version once everything started to work fast.

Thanks for the quick reply

@oshri551
Copy link
Author

After restart the issue continue - I've attached the cpu profile
CPU.20210623.102607.20096.0.001.zip

@oshri551 oshri551 reopened this Jun 23, 2021
@alan-agius4 alan-agius4 added area: @angular/cli and removed needs: more info Reporter must clarify the issue labels Jun 23, 2021
@ngbot ngbot bot added this to the needsTriage milestone Jun 23, 2021
@alan-agius4 alan-agius4 added the needs: more info Reporter must clarify the issue label Jun 23, 2021
@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix and removed needs: more info Reporter must clarify the issue labels Jun 24, 2021
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jun 24, 2021
alan-agius4 added a commit that referenced this issue Jun 25, 2021
…nager version during `ng version`

NPM updater notifier will prevents the child process from closing until it timeout after 3 minutes.

Closes #21172
alan-agius4 added a commit that referenced this issue Jun 25, 2021
…nager version during `ng version`

NPM updater notifier will prevents the child process from closing until it timeout after 3 minutes.

Closes #21172

(cherry picked from commit 88ee85c)
@oshri551
Copy link
Author

Version 12.1.1 solved the 3 min wait for ng version but, it also happens in ng new <project_name>
Do we need CPU profile again?

@alan-agius4
Copy link
Collaborator

Version 12.1.1 solved the 3 min wait for ng version but, it also happens in ng new <project_name>
Do we need CPU profile again?

Updating the global CLI version should solve the issue.

npm i -g @angular/cli

@oshri551
Copy link
Author

I've updated the version today and now on 12.1.1 and even ng update command on on local project - version (10.0.x) wait 3 min to start:

C:\Users\oifrah>ng version

 _                      _                 ____ _     ___
/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | |
/ ___ | | | | (
| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/

Angular CLI: 12.1.1
Node: 14.17.1
Package Manager: npm 6.14.13
OS: win32 x64

Angular:
...

Package Version

@angular-devkit/architect 0.1201.1 (cli-only)
@angular-devkit/core 12.1.1 (cli-only)
@angular-devkit/schematics 12.1.1 (cli-only)
@schematics/angular 12.1.1 (cli-only)

@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 Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants