尝试在角度6中运行ng generate @angular/material-nav --name=main-nav
命令时引发以下错误。有人可以帮我解决这个问题吗?
错误:在集合中找不到示意图“ @ angular / material-nav” “ @ schematics /角度”。
Dependencies:
"dependencies": {
"@angular/animations": "^6.0.6",
"@angular/cdk": "^6.3.0",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/material": "^6.3.0",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/router": "^6.0.3",
"core-js": "^2.5.4",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
},
答案 0 :(得分:0)
暂时无法在 GitHub 上找到任何未解决的问题,因为它们正在将您的@angular/cdk:"6.0.0"
和"@angular/material": "6.0.0"
修改您的package.json
"dependencies": {
"@angular/animations": "^6.0.6",
"@angular/cdk": "6.0.0",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/material": "6.0.0",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/router": "^6.0.3",
"core-js": "^2.5.4",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
},
执行npm i