Reputation: 905
The command ng add angular/material @angular/cdk @angular/animations
results in following error message:
Your global Angular CLI version (8.3.1) is greater than your local version (6.0.8). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Installing packages for tooling via npm. Schematics/alias "install" collides with another alias or schematic name. Error: Schematics/alias "install" collides with another alias or schematic name. at NodeModulesEngineHost.createCollectionDescription (D:\path\ClientApp\node_modules@angular-devkit\schematics\tools\file-system-engine-host-base.js:125:27) at SchematicEngine._createCollectionDescription (D:\path\ClientApp\node_modules@angular-devkit\schematics\src\engine\engine.js:78:40) at SchematicEngine.createCollection (D:\path\ClientApp\node_modules@angular-devkit\schematics\src\engine\engine.js:71:43) at Object.getCollection (D:\path\ClientApp\node_modules@angular\cli\utilities\schematics.js:28:31) at AddCommand.getOptions (D:\path\ClientApp\node_modules@angular\cli\models\schematic-command.js:193:41) at AddCommand. (D:\path\ClientApp\node_modules@angular\cli\commands\add.js:30:49) at Generator.next () at D:\path\ClientApp\node_modules@angular\cli\commands\add.js:7:71 at new Promise () at __awaiter (D:\path\ClientApp\node_modules@angular\cli\commands\add.js:3:12)
This is my package.json(after installing the above mentioned command):
{
"name": "PWA.web",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build:ssr": "ng run PWA.web:server:dev",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "6.1.10",
"@angular/common": "6.1.10",
"@angular/compiler": "6.1.10",
"@angular/core": "6.1.10",
"@angular/forms": "6.1.10",
"@angular/http": "6.1.10",
"@angular/platform-browser": "6.1.10",
"@angular/platform-browser-dynamic": "6.1.10",
"@angular/platform-server": "6.1.10",
"@angular/router": "6.1.10",
"@nguniversal/module-map-ngfactory-loader": "6.0.0",
"core-js": "^2.5.4",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26",
"aspnet-prerendering": "^3.0.1",
"bootstrap": "^4.3.1",
"jquery": "3.3.1",
"popper.js": "^1.14.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.0",
"@angular/cli": "~6.0.0",
"@angular/compiler-cli": "6.1.10",
"@angular/language-service": "^6.0.0",
"@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": "^3.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"typescript": "~2.7.2"
},
"optionalDependencies": {
"node-sass": "^4.9.3",
"protractor": "~5.4.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1"
}
}
After updating the CLI, I get("Invalid rule result: Function()"), in the console:
λ ng update @angular/cli Your global Angular CLI version (8.3.1) is greater than your local version (6.0.8). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false". packageGroup metadata of package @angular/cli is malformed. packageGroup metadata of package @angular/cli is malformed. Ignoring. Updating package.json with dependency @angular/cli @ "8.3.1" (was "6.0.8")... UPDATE package.json (1630 bytes)
@angular/[email protected] postinstall D:\path\ClientApp\node_modules@angular\cli node ./bin/postinstall/script.js
npm WARN [email protected] requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 157 packages from 125 contributors, removed 5 packages, updated 5 packages and audited 17353 packages in 66.365s found 238 vulnerabilities (2 low, 14 moderate, 222 high) run
npm audit fix
to fix them, ornpm audit
for details ** Executing migrations for package '@angular/cli' ** Invalid rule result: Function().
After executing ng add angular/material @angular/cdk @angular/animations
again, it shows no error in the console, but when I start the project I get [error] Error: Could not find the implementation for builder @angular-devkit/build-angular:dev-server
written on the webpage.
Find complete error log here:
https://shrib.com/#V8wxfbAihcJi8Nszax7L
Using asp.net core 2.2, what to do here?
Upvotes: 0
Views: 4384
Reputation: 24472
This is an issue with Angular-CLI 6.0.8 (https://github.com/angular/components/issues/12362).
Update to Angular-CLI 6.1 to fix this:
ng update @angular/cli
For the second issue you are facing, you could try:
(Solution from https://github.com/angular/angular-cli/issues/14546)
Upvotes: 0