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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 16 tasks
appimpact opened this issue Aug 16, 2020 · 3 comments 路 Fixed by #18553
Closed
1 of 16 tasks

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

appimpact opened this issue Aug 16, 2020 · 3 comments 路 Fixed by #18553
Assignees
Labels
area: devkit/schematics-cli freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@appimpact
Copy link

appimpact commented Aug 16, 2020

馃悶 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?

@alan-agius4
Copy link
Collaborator

Do you have node_modules installed in C:\Tests\Schematics\app?

Also, any reason why you are using both the Angular CLI and Schematics CLI?

@appimpact
Copy link
Author

image

All packages are installed.
ng generate is working correctly, so it is only --list-schematics that is not working.

Schematics CLI was installed to be able to use "schematics" from command prompt.

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

Successfully merging a pull request may close this issue.

2 participants