Skip to content

Can not add material to project using ng add @angular/material #11836

Closed
@landonwaldner

Description

@landonwaldner

Bug, feature request, or proposal:

Can not add material using schematic

What is the expected behavior?

Add material to project

What is the current behavior?

PS C:\Users\lando\test-project> ng add @angular/material
Installing packages for tooling via npm.
Collection "@angular/material" cannot be resolved.
Error: Collection "@angular/material" cannot be resolved.
at NodeModulesEngineHost._resolveCollectionPath (C:\Users\lando\test-project\node_modules@angular-devkit\schematics\tools\node-module-engine-host.js:88:15)
at NodeModulesEngineHost.createCollectionDescription (C:\Users\lando\test-project\node_modules@angular-devkit\schematics\tools\file-system-engine-host-base.js:106:27)
at SchematicEngine._createCollectionDescription (C:\Users\lando\test-project\node_modules@angular-devkit\schematics\src\engine\engine.js:78:40) at SchematicEngine.createCollection (C:\Users\lando\test-project\node_modules@angular-devkit\schematics\src\engine\engine.js:71:43)
at Object.getCollection (C:\Users\lando\test-project\node_modules@angular\cli\utilities\schematics.js:28:31) at AddCommand.getOptions (C:\Users\lando\test-project\node_modules@angular\cli\models\schematic-command.js:193:41)
at AddCommand. (C:\Users\lando\test-project\node_modules@angular\cli\commands\add.js:30:49) at Generator.next ()
at C:\Users\lando\test-project\node_modules@angular\cli\commands\add.js:7:71 at new Promise ()

What are the steps to reproduce?

ng new test-project --style scss --routing
ng add @angular/material

What is the use-case or motivation for changing an existing behavior?

Having it work

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"dependencies": {
"@angular/animations": "^6.0.3",
"@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"
},
"devDependencies": {
"@angular/compiler-cli": "^6.0.3",
"@angular-devkit/build-angular": "~0.6.8",
"typescript": "~2.7.2",
"@angular/cli": "~6.0.8",
"@angular/language-service": "^6.0.3",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1"
}

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painful

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions