Skip to content

'Collection "@schematics/angular" cannot be resolved.' error on --list-schematics #18548

@appimpact

Description

@appimpact

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc
  • schematics

Is this a regression?

This is the first time we are using this CLI.

Description

--list-schematics is returning an error when trying to list all schematics available in @schematics/angular or @angular/material package.

However, schematics are working as expected when we use ng generate, i.e.:
ng g c test-component => generates new blank component
ng g @angular/material:table --name test-table => generates new material design table

Schematics CLI is installed globally with the following command:
npm install @angular-devkit/schematics-cli -g

🔬 Minimal Reproduction

🔥 Exception or Error



C:\Tests\Schematics\app>schematics @schematics/angular: --list-schematics
Collection "@schematics/angular" cannot be resolved.

🌍 Your Environment



Angular CLI: 10.0.6
Node: 14.5.0
OS: win32 x64

Angular: 10.0.9
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: 

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.6
@angular-devkit/build-angular     0.1000.6
@angular-devkit/build-optimizer   0.1000.6
@angular-devkit/build-webpack     0.1000.6
@angular-devkit/core              10.0.6
@angular-devkit/schematics        10.0.6
@angular/cdk                      10.1.3
@angular/cli                      10.0.6
@angular/flex-layout              10.0.0-beta.32
@angular/material                 10.1.3
@ngtools/webpack                  10.0.6
@schematics/angular               10.0.6
@schematics/update                0.1000.6
rxjs                              6.6.2
typescript                        3.9.7
webpack                           4.43.0

Anything else relevant?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions