Platform: Error: Schematic "store" not found in collection "@schematics/angular"

Created on 19 Jul 2019  路  3Comments  路  Source: ngrx/platform

I just tried to add NgRx to my project reading this https://ngrx.io/guide/schematics/store and I get error when run the command ng generate store State --root --module app.module.ts:

An unhandled exception occurred: Schematic "store" not found in collection "@schematics/angular".

I did install it with npm install @ngrx/schematics --save-dev.

What am I doing wrong?

Windows 10 x64, node 10.16.0, angular 8.1.0

Most helpful comment

uninstalled it with npm. And then installed it with ng add @ngrx/schematics. Now it works!

All 3 comments

Log:


[error] Error: Schematic "store" not found in collection "@schematics/angular".
at SchematicEngine.createSchematic ([path]\node_modules\@angular-devkit\schematics\src\engine\engine.js:232:23)
at CollectionImpl.createSchematic ([path]\node_modules\@angular-devkit\schematics\src\engine\engine.js:69:29)
at GenerateCommand.getSchematic ([path]\node_modules\@angular\cli\models\schematic-command.js:136:27)
at GenerateCommand.initialize ([path]\node_modules\@angular\cli\models\schematic-command.js:46:36)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

uninstalled it with npm. And then installed it with ng add @ngrx/schematics. Now it works!

ng add sets the default collection, if you install it via npm or yarn, you need to do this manually.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brandonroberts picture brandonroberts  路  3Comments

doender picture doender  路  3Comments

axmad22 picture axmad22  路  3Comments

NathanWalker picture NathanWalker  路  3Comments

gperdomor picture gperdomor  路  3Comments