Я пытаюсь настроить Angular Material для проекта Angular 6.Однако, при попытке запустить:
ng generate @angular/material:material-nav --project=ui-project
я получаю следующее сообщение об ошибке:
Cannot read property 'replace' of undefined
Вот мой package.json
{
"name": "ui-project",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular-devkit/schematics": "^0.8.1",
"@angular/cdk": "^6.2.1",
"@angular/common": "^6.1.7",
"@angular/compiler": "^6.1.7",
"@angular/core": "^6.1.7",
"@angular/forms": "^6.1.7",
"@angular/http": "^6.1.7",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "^6.1.7",
"@angular/platform-browser-dynamic": "^6.1.7",
"@angular/router": "^6.1.7",
"core-js": "^2.4.1",
"help": "^3.0.2",
"parse5": "^5.1.0",
"rxjs": "^6.3.2",
"ts-helpers": "^1.1.1",
"zone.js": "^0.8.26",
"@angular/animations": "^6.0.0"
},
"devDependencies": {
"@types/jasmine": "2.8.8",
"@types/node": "^10.9.4",
"codelyzer": "~4.4.4",
"jasmine-core": "3.2.1",
"jasmine-spec-reporter": "4.2.1",
"karma": "3.0.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.6.0",
"protractor": "~5.4.0",
"ts-node": "7.0.1",
"tslint": "^5.11.0",
"typescript": "~3.0.3",
"webpack": "^4.17.2"
}
}
Я работаюследующее: Angular CLI: 6.2.1 Узел: 10.9.0 ОС: darwin x64 Angular: 6.1.7