19

このページに表示されている Angular スキーマを使用しようとしています。プロジェクトng generate @angular/material:material-nav --name name-of-new-nav のルートにあるターミナルでこの次のコマンドを使用しようとすると、次のエラーが赤色で表示されます。

コレクション「@angular/material」を解決できません。エラー: コレクション "@angular/material" を解決できません。NodeModulesEngineHost._resolveCollectionPath (/Users/jeremypeters/MEGA/development/learning/angular/material-learn/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js:88:15) で NodeModulesEngineHost に。 createCollectionDescription (/Users/jeremypeters/MEGA/development/learning/angular/material-learn/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js:106:27) at SchematicEngine._createCollectionDescription (/Users/jeremypeters/MEGA/development/learning/angular/material-learn/node_modules/@angular-devkit/schematics/src/engine/engine.js:78:40) SchematicEngine で。Object.getCollection (/Users/jeremypeters/ MEGA/development/learning/angular/material-learn/node_modules/@angular/cli/utilities/schematics.js:28:31) GenerateCommand.getOptions (/Users/jeremypeters/MEGA/development/learning/angular/material-learn) で/node_modules/@angular/cli/models/schematic-command.js:193:41) GenerateCommand で。(/Users/jeremypeters/MEGA/development/learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:38:53) Generator.next () at /Users/jeremypeters/MEGA/development /learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:7:71 at new Promise () GenerateCommand.getOptions (/Users/jeremypeters/MEGA/development/ learning/angular/material-learn/node_modules/@angular/cli/models/schematic-command.js:193:41) GenerateCommand で。(/Users/jeremypeters/MEGA/development/learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:38:53) Generator.next () at /Users/jeremypeters/MEGA/development /learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:7:71 at new Promise () GenerateCommand.getOptions (/Users/jeremypeters/MEGA/development/ learning/angular/material-learn/node_modules/@angular/cli/models/schematic-command.js:193:41) GenerateCommand で。(/Users/jeremypeters/MEGA/development/learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:38:53) Generator.next () at /Users/jeremypeters/MEGA/development /learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:7:71 at new Promise () 41) GenerateCommand で。(/Users/jeremypeters/MEGA/development/learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:38:53) Generator.next () at /Users/jeremypeters/MEGA/development /learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:7:71 at new Promise () 41) GenerateCommand で。(/Users/jeremypeters/MEGA/development/learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:38:53) Generator.next () at /Users/jeremypeters/MEGA/development /learning/angular/material-learn/node_modules/@angular/cli/commands/generate.js:7:71 at new Promise ()

これを機能させるにはどうすればよいですか?

情報: Angular CLI: 6.0.8

4

6 に答える 6