question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular CLI Crashes when executing NG G D

See original GitHub issue

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

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

Yes the last version of angular 14.0.0

Description

A clear and concise description of the problem...

πŸ”¬ Minimal Reproduction

by executing the command ng g d to generate a directive

You can read more about issue submission guidelines here: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-submitting-an-issue –>

πŸ”₯ Exception or Error




catch clause variable is not an Error instance
See "/private/var/folders/9q/zm232ccd4hx209x2zklqt5mc0000gn/T/ng-MHxcXl/angular-errors.log" for further details

🌍 Your Environment




Angular CLI: 14.1.0
Node: 16.14.0
Package Manager: npm 8.11.0 
OS: darwin arm64

Angular: 14.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.6
@angular-devkit/build-angular   14.1.0
@angular-devkit/core            14.0.6
@angular-devkit/schematics      14.1.0
@nguniversal/builders           14.0.3
@nguniversal/express-engine     14.0.3
@schematics/angular             14.1.0
rxjs                            7.5.6
typescript                      4.7.4

Anything else relevant?

the log file created

[error] AssertionError [ERR_ASSERTION]: catch clause variable is not an Error instance
    at assertIsError (/Users/ME/development/platform/cacheclient/node_modules/@angular/cli/src/utilities/error.js:16:26)
    at GenerateCommandModule.runSchematic (/Users/ME/development/platform/cacheclient/node_modules/@angular/cli/src/command-builder/schematics-command-module.js:311:43)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async GenerateCommandModule.handler (/Users/ME/development/platform/cacheclient/node_modules/@angular/cli/src/command-builder/command-module.js:109:24)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alan-agius4commented, Aug 4, 2022

Thanks for reporting this issue. Luckily, it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.

If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use ng new repro-app to create a new project where you reproduce the problem.

0reactions
mgechevcommented, Aug 4, 2022

Hey Chris, as @alan-agius4 mentioned, we fixed this issue in v14.1.1. Make sure you update to the latest patch version to resolve the problem. I’ll lock the conversation because it seems to be going off topic.

In case update to 14.1.1 does not help, please open a new issue with a reproduction so we can investigate.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

serve crashes randomly after upgrading to Angular 12 #20801
While running ng serve for a few hours it will randomly crash with an error. When I upgraded to angular 12, I also...
Read more >
ng serve crashes after second code change - Stack Overflow
It seems like a problem by angular... Try uninstalling angular globally and then install it again npm install -g @angular/cli@12.1.12.
Read more >
Mastering the Angular Cli - Fikayo Adepoju
Once you have successfully installed Node (with Npm automatically included), install the Angular Cli by running the command. npm install -g @angular/cli.
Read more >
Working with Angular CLI - A Hands-on Guide to Angular
Run this command inside your Angular project. This will give you the introduction view of any Angular Application with the title as the...
Read more >
node server crashes #9314 - Asp.Net Zero Support
This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found