-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Description
Command
generate
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Hi, last week I was using ng generate and there wasn't any problems.
Today, when I'm running
ng g c [component_name]
I got this error: "Could not find an NgModule. Use the '--skip-import' option to skip importing in NgModule."
So I tried to run this
ng g c --standalone [component_name]
It generates successfully, however the component now coming with suffixes.
Minimal Reproduction
Run:
ng g c [component_name]
Error: "Could not find an NgModule. Use the '--skip-import' option to skip importing in NgModule."
ng g c --standalone [component_name]
It generates successfully, however the component now coming with suffixes.
Exception or Error
Your Environment
Angular CLI: 20.3.3
Node: 22.19.0
Package Manager: npm 11.1.0
OS: win32 x64
Angular: 20.2.4
... common, compiler, compiler-cli, core, forms
... platform-browser, router
Package Version
------------------------------------
@angular-devkit/architect 0.2002.2
@angular-devkit/core 20.2.2
@angular-devkit/schematics 20.3.3
@angular/build 20.2.2
@angular/cdk 20.2.2
@angular/cli 20.3.3
@angular/material 20.2.2
@schematics/angular 20.3.3
rxjs 7.8.2
typescript 5.9.2
Anything else relevant?
No response
Metadata
Metadata
Assignees
Labels
No labels