Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: 'TreeModule' does not appear to be an NgModule class. #352

Open
MuneebChaudhry-dev opened this issue Nov 24, 2022 · 0 comments
Open

Comments

@MuneebChaudhry-dev
Copy link

MuneebChaudhry-dev commented Nov 24, 2022

When I imported the 'TreeModule' and include it in imports It display this following error
'TreeModule' does not appear to be an NgModule class.
This likely means that the library (ng2-tree) which declares TreeModule has not been processed correctly by ngcc, or 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.

I have tried different solutions like in tsconfig I made following changes:

  • "importHelpers": true,

  • "enableIvy": false, // in angularCompilerOptions

  • I have also cleared the cache of Angular and npm

  • I have also deleted and reinstall node_modules

These solutions didn't worked for me.Please help me to find out the problem and recommend a suitable solution.

I have following dependencies and devDependencies:

 "dependencies": {
    "@angular/animations": "^14.1.0",
    "@angular/common": "^14.1.0",
    "@angular/compiler": "^14.1.0",
    "@angular/core": "^14.1.0",
    "@angular/forms": "^14.1.0",
    "@angular/platform-browser": "^14.1.0",
    "@angular/platform-browser-dynamic": "^14.1.0",
    "@angular/router": "^14.1.0",
    "@syncfusion/ej2-angular-navigations": "^20.3.57",
    "directory-tree": "^3.4.0",
    "ng2-tree": "^2.0.0-rc.11",
    "rxjs": "~7.5.0",
    "tslib": "^2.3.0",
    "underscore": "^1.13.6",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^14.1.0",
    "@angular/cli": "~14.1.0",
    "@angular/compiler-cli": "^14.1.0",
    "@types/jasmine": "~4.0.0",
    "electron": "^21.2.3",
    "jasmine-core": "~4.2.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.0.0",
    "typescript": "~4.7.2"
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant