Cannot find module '@angular-devkit/schematics' while running cmd: ng new --collection=@angular/bazel
See original GitHub issueπ Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- xi18n
- run
- config
- help
- version
- doc
Is this a regression?
Yes, the previous version in which this bug was not present was: ....Description
Trying to run ng new --collection=@angular/bazel
getting error: Cannot find module β@angular-devkit/schematicsβ
@angular/cli 9.0.1
@angular/bazel 9.0.0
π¬ Minimal Reproduction
npm i -g @angular/cli @angular/bazel
ng new ng new --collection=@angular/bazel
π₯ Exception or Error
An unhandled exception occurred: Cannot find module '@angular-devkit/schematics'
Require stack:
- C:\Users\vltan\AppData\Roaming\npm\node_modules\@angular\bazel\src\schematics\ng-new\index.js
- C:\Users\vltan\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\Users\vltan\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\tools\index.js
- C:\Users\vltan\AppData\Roaming\npm\node_modules\@angular\cli\utilities\json-schema.js
- C:\Users\vltan\AppData\Roaming\npm\node_modules\@angular\cli\models\command-runner.js
- C:\Users\vltan\AppData\Roaming\npm\node_modules\@angular\cli\lib\cli\index.js
- C:\Users\vltan\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js
- C:\Users\vltan\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
See "C:\Users\vltan\AppData\Local\Temp\ng-FnUFw6\angular-errors.log" for further details.
π Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ β³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.0.1
Node: 12.15.0
OS: win32 x64
Angular:
...
Ivy Workspace:
Package Version
------------------------------------------------------
@angular-devkit/architect 0.900.1
@angular-devkit/core 9.0.1
@angular-devkit/schematics 9.0.1
@schematics/angular 9.0.1
@schematics/update 0.900.1
rxjs 6.5.3
Anything else relevant?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Error: Cannot - find - module - '@angular-devkit/schematics'
When I tried installing angular material to my project I got the same error like. Cannot find module '@angular-devkit/schematics/tasks' inΒ ...
Read more >Schematics for libraries - Angular
The Angular CLI uses this entry to find named schematics in your collection when it runs commands. projects/my-lib/package.json (Schematics Collection Reference)
Read more >@angular-devkit/schematics - npm
Start using @angular-devkit/schematics in your project by running `npm i @angular-devkit/schematics`. There are 1679 other projects in theΒ ...
Read more >Cannot find module '@angular-devkit/build-angular ... - YouTube
An unhandled exception occurred: Cannot find module '@ angular - devkit /build-angular/package.json'The above exception while running an angularΒ ...
Read more >cannot find module '@angular-devkit/schematics' - You.com ...
This is happening because of your node_modules does not contain the material directory. To add Material into your node_modules run below command. npm...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had the same error. Fixed it with
Then updated with
Received these messages:
Although it only mentions two of the three newly installed packages, i uninstalled all three of them:
Exactly. The issue is about creating new project, not updating or
ng add @angular/bazel
. Installing modules globally did the trick. So, just to summarize: run: 1.npm i -g @angular-devkit/schematics @angular-devkit/core @schematics/angular tslib
2.ng new --collection=@angular/bazel
3.ng serve
I succeeded to build a project withng serve
onangular 9.0.5
so the bug is actually about having to manually install modules globally