示意图“存储"未在集合“@schematics/angular"中找到; [英] Schematic "store" not found in collection "@schematics/angular"

查看:70
本文介绍了示意图“存储"未在集合“@schematics/angular"中找到;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下命令安装 ngrx/store:

I install ngrx/store with the following command :

ng add @ngrx/store 

然后我想添加商店

ng generate store auth/Auth --module auth.module.ts

出现以下错误:

发生未处理的异常:Schematic store"没有找到集合@schematics/angular".参见xxx\angular-errors.log"为了更多详情.

An unhandled exception occurred: Schematic "store" not found in collection "@schematics/angular". See "xxx\angular-errors.log" for further details.

推荐答案

因为 ngrx 不是直接的 angular 原理图.Ngrx 是一个外部库,支持向 Angular 项目添加文件或创建文件

Because ngrx is not an direct angular schematics. Ngrx is a external library which provide support to add files or create files to your angular project

您应该从 ngrx 原理图 json 文件生成商店文件,为此您应该运行如下命令

Your are suppose to generate store file from the ngrx schematics json file, to do that you should run command like below

ng generate @ngrx/schematics:store State --root --module app.module.ts

ng generate @ngrx/schematics:store State --root --module app.module.ts

您可以在此处找到其用法的详细文档:在此处输入链接描述

You can find the detail documentation of its usage here : enter link description here

这篇关于示意图“存储"未在集合“@schematics/angular"中找到;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆