angular: Cannot find module '@angular-devkit/schematics' while running cmd: ng new --collection=@angular/bazel
đ 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?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 13
- Comments: 15 (2 by maintainers)
Commits related to this issue
- build: update Angular (2) Workaround: - npm install @angular-devkit/schematics @angular-devkit/core @schematics/angular See https://github.com/angular/angular/issues/35221. — committed to Berlin-Vegan/berlin-vegan-map by marco-eckstein 4 years ago
- Fresh npm install Also temporary installed packages for upgrade (see:https://github.com/angular/angular/issues/35221#issuecomment-584170071) — committed to T-Systems-MMS/phonebook by DanielHabenicht 4 years ago
- fix(perf): Update to angular 9 (#509) * Update Angular to 8.2.3 before updating to 9 * Fresh npm install Also temporary installed packages for upgrade (see:https://github.com/angular/angular/is... — committed to T-Systems-MMS/phonebook by DanielHabenicht 4 years ago
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
But if youâre running
ng new --collection=@angular/bazel
then you donât have a project yet!I ran them globally. Then I got
Cannot find module 'tslib'
. This worked to fix that:I can actually run
ng serve
now for the sample project, but I just cannot get past this:Seems they werenât kidding about bazel not being production ready for angular.
Installing @angular-devkit/schematics @angular-devkit/core @schematics/angular
did the trick, but I guess that this should not need to be a thing in a normal update
I have the exactly same issue since RC8
this is work for me. Thanks
Did you install these globally?
Hmm that stack trace makes me think itâs a problem in
@angular/bazel
itself, which in part of the https://github.com/angular/angular repo. Transferring there.