問題タブ [angular-cli-v6]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
6 に答える
10980 参照

angular - AngularCLI および Angular Material (回路図) エラー: コレクション "@angular/material" を解決できません

このページに表示されている 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