I created a brand new ASP.NET Core MVC (Web Application - .NET Core version = 3.1) project with the Angular template:

It comes with some basic pre-defined modules and components:

Out of the box it works fine.
As soon as I add an import on any Angular Material module in my "app.module.ts" module, when I try to debug it locally via IIS Express, I immediately get the following error:

I haven't even tried implementing the material component yet, all I did was add the import to my app.module.ts. The only other error I notice is whenever I do an ng serve my Console says:
But it still starts up the Angular Server anyway.
I was following the getting started guide when I ran into this issue: https://material.angular.io/guide/getting-started
Here's my app.module.ts (literally no changes from what's auto-generated with the Visual Studio Angular template, other than the import statements):
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { NavMenuComponent } from './nav-menu/nav-menu.component';
import { HomeComponent } from './home/home.component';
import { CounterComponent } from './counter/counter.component';
import { FetchDataComponent } from './fetch-data/fetch-data.component';
import { MatSliderModule } from '@angular/material/slider';
@NgModule({
declarations: [
AppComponent,
NavMenuComponent,
HomeComponent,
CounterComponent,
FetchDataComponent
],
imports: [
BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }),
HttpClientModule,
FormsModule,
RouterModule.forRoot([
{ path: '', component: HomeComponent, pathMatch: 'full' },
{ path: 'counter', component: CounterComponent },
{ path: 'fetch-data', component: FetchDataComponent },
]),
MatSliderModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
I really want to start using Angular, but what the heck gives?
Update: Here is my package.json file:
{
"name": "testangularmaterial",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build:ssr": "ng run TestAngularMaterial:server:dev",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^8.2.12",
"@angular/cdk": "^10.2.3",
"@angular/common": "8.2.12",
"@angular/compiler": "8.2.12",
"@angular/core": "8.2.12",
"@angular/forms": "8.2.12",
"@angular/material": "^10.2.3",
"@angular/platform-browser": "^8.2.12",
"@angular/platform-browser-dynamic": "8.2.12",
"@angular/platform-server": "8.2.12",
"@angular/router": "8.2.12",
"@nguniversal/module-map-ngfactory-loader": "8.1.1",
"aspnet-prerendering": "^3.0.1",
"bootstrap": "^4.3.1",
"core-js": "^3.3.3",
"jquery": "3.4.1",
"oidc-client": "^1.9.1",
"popper.js": "^1.16.0",
"rxjs": "^6.5.3",
"zone.js": "0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.803.26",
"@angular/cli": "^8.3.26",
"@angular/compiler-cli": "^8.2.14",
"@angular/language-service": "^8.2.12",
"@types/jasmine": "~3.4.4",
"@types/jasminewd2": "~2.0.8",
"@types/node": "~12.11.6",
"codelyzer": "^5.2.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^5.0.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"typescript": "3.5.3"
},
"optionalDependencies": {
"node-sass": "^4.12.0",
"protractor": "~5.4.2",
"ts-node": "~8.4.1",
"tslint": "~5.20.0"
}
}
Also, I noticed in this test project my Angular CLI version was 8.3.26 so I created another brand new test project (ASP.NET Core MVC) with a blank template and manually ran the ng commands to add an Angular project to it. Still running into the same exact issues as above though.
npm fundfor details found 279 vulnerabilities (270 low, 1 moderate, 8 high) runnpm audit fixto fix them, ornpm auditfor details