Skip to content

ng generate component - catch clause variable is not an Error instance  #23631

@kaan35

Description

@kaan35

🐞 Bug report

Command (mark with an x)

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

Description

Hello

After adding server side rendering I can't create new component with cli command.

A clear and concise description of the problem... -->

🔬 Minimal Reproduction

npm i -g @angular/cli
ng new myapp && cd myapp
ng add @nguniversal/express-engine
ng generate component test

🔥 Exception or Error



An unhandled exception occurred: catch clause variable is not an Error instance
[error] AssertionError [ERR_ASSERTION]: catch clause variable is not an Error instance


🌍 Your Environment



Angular CLI: 14.1.0
Node: 18.6.0 (Unsupported)
Package Manager: npm 8.14.0 
OS: linux x64

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.1401.0
@angular-devkit/build-angular   14.1.0
@angular-devkit/core            14.1.0
@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



Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions