Encountering a problem with using Angular in VSCode, where there seems to be no ngModules due to AngularIvy. The error message indicates an issue with 'CommonModule' not being recognized as an NgModule class:
[{
"resource": "[...]src/app/components/basic-info-card/basic-info-card.module.ts",
"owner": "_generated_diagnostic_collection_name_#4",
"code": "-996002",
"severity": 8,
"message": "'CommonModule' does not appear to be an NgModule class.",
"startLineNumber": 13,
"startColumn": 5,
"endLineNumber": 13,
"endColumn": 17,
"relatedInformation": [
{
"startLineNumber": 22,
"startColumn": 39,
"endLineNumber": 22,
"endColumn": 39,
"message": "This likely means that the library (@angular/common) which declares CommonModule is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.",
"resource": "not+gona+show"
}
]
}]
Frustratingly, 'CommonModule' is indeed a part of the class and project, making it puzzling why there would be a conflict with Angular Ivy despite deactivating it in tsconfidg.app.json:
...
"angularCompilerOptions": {
"enableIvy": false
}
The goal is to create a module named "my-project" within an angular project called "project." Any insights or assistance will be greatly appreciated.
Useful Information:
System: Windows 10 home Avast free
VSCODE version
Version: 1.80.1 (user setup)
Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771
Date: 2023-07-12T17:22:07.651Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621
ANGULAR VERSION
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.17
Node: 14.21.3
OS: win32 x64
Angular: 8.2.13
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.803.29
@angular-devkit/build-angular 0.803.29
@angular-devkit/build-ng-packagr 0.803.29
@angular-devkit/build-optimizer 0.803.29
@angular-devkit/build-webpack 0.803.29
@angular-devkit/core 8.3.29
@angular-devkit/schematics 8.3.17
@angular/cdk 8.2.3
@angular/cli 8.3.17
@angular/material 8.2.3
@ngtools/webpack 8.3.29
@schematics/angular 8.3.17
@schematics/update 0.803.17
ng-packagr 5.7.1
rxjs 6.5.3
typescript 3.5.3
webpack 4.39.2
package.json:
{
"name": "project",
...
angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
...
my tsconfig.json:
{
"compileOnSave": false,
...
Tried multiple solutions like restarting server, reinstalling dependencies, but the issue persists. Suspecting it may be related to VSCode itself. Seeking guidance to resolve this impediment.