可能
@ngrx/schematics
的版本与@ngrx/store
的版本不同,你可以在你的项目的package.json
文件中查看。
如果不同,- 手动将
@ngrx/store
版本复制到 @ngrx/schematics
版本并运行 npm install
。
顺便说一句,检查文件 angular.json 中是否存在此行:
"cli": {
"schematicCollections": [
"@ngrx/schematics"
]
}
当我更改 ngrx 版本与 package.json 中的 Angular 版本相同时,这个问题解决了我,然后 npm i。