leovo2708 / ngx-treeview

An Angular treeview component with checkbox
MIT License
363 stars 337 forks source link

Metadata version mismatch for module found version 4, expected 3 #90

Closed alejuanito closed 6 years ago

alejuanito commented 6 years ago

I'm use angular 4 but this is my error

ERROR in Error: Metadata version mismatch for module ..t/node_modules/ngx-treeview/src/index.d.ts, found version 4, expected 3, resolving symbol AppModule in ../src/app/app.module.ts, resolving symbol AppModule in ../src/app/app.module.ts, resolving symbol AppModule in ../src/app/app.module.ts at Error (native) at syntaxError (..\node_modules\@angular\compiler\bundles\compiler.umd.js:1729:34) at simplifyInContext (..\node_modules\@angular\compiler\bundles\compiler.umd.js:24979:23) at StaticReflector.simplify (..\node_modules\@angular\compiler\bundles\compiler.umd.js:24991:13) at StaticReflector.annotations (..\node_modules\@angular\compiler\bundles\compiler.umd.js:24418:41) at _getNgModuleMetadata (..t\node_modules\@angular\compiler-cli\src\ngtools_impl.js:138:31) at _extractLazyRoutesFromStaticModule (..\node_modules\@angular\compiler-cli\src\ngtools_impl.js:109:26)

Dependencies

"dependencies": {
    "@angular/animations": "^4.3.4",
    "@angular/common": "^4.3.4",
    "@angular/compiler": "^4.3.4",
    "@angular/core": "^4.3.4",
    "@angular/forms": "^4.3.4",
    "@angular/http": "^4.3.4",
    "@angular/platform-browser": "^4.3.4",
    "@angular/platform-browser-dynamic": "^4.3.4",
    "@angular/router": "^4.3.4",
    "angular2-multiselect-dropdown": "^1.3.4",
    "angular2-notifications": "^0.7.7",
    "core-js": "^2.5.0",
    "ng2-bs3-modal": "^0.10.4",
    "ng2-charts": "^1.6.0",
    "ng2-completer": "^1.6.0",
    "ng2-datepicker": "^1.8.3",
    "ng2-datepicker-bootstrap": "^1.0.0",
    "ng2-sweetalert2": "0.0.8",
    "ng2-validation": "^4.2.0",
    "ngx-mydatepicker": "^2.1.3",
    "ngx-treeview": "^2.0.0",
    "rxjs": "^5.4.3",
    "underscore": "^1.8.3",
    "zone.js": "^0.8.16"
  },
  "devDependencies": {
    "@angular/cli": "^1.3.1",
    "@angular/compiler-cli": "^4.3.4",
    "@types/jasmine": "2.5.38",
    "@types/moment": "^2.13.0",
    "@types/node": "~6.0.60",
    "@types/underscore": "^1.8.1",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "~2.2.0",
    "uglify-js": "git://github.com/mishoo/UglifyJS2#harmony-v2.8.22"
  }
SleimanB commented 6 years ago

I have the same issue using @angular/core@4.4.6

alejuanito commented 6 years ago

I continue with the same problems, I had to change and now I use https://angular2-tree.readme.io/v6.1.0

leovo2708 commented 6 years ago

Sorry. I fixed it in version 2.0.1. Thanks.

SleimanB commented 6 years ago

I tried to install the newest version 2.0.1

+-- UNMET PEER DEPENDENCY @angular/common@4.4.6
+-- UNMET PEER DEPENDENCY @angular/core@4.4.6
+-- UNMET PEER DEPENDENCY @angular/forms@4.4.6
+-- UNMET PEER DEPENDENCY @angular/platform-browser@4.4.6
+-- UNMET PEER DEPENDENCY echarts@>=3.1.1
+-- UNMET PEER DEPENDENCY firebase@4.2.0
+-- ngx-treeview@2.0.1
+-- UNMET PEER DEPENDENCY popper.js@^1.12.3
`-- UNMET PEER DEPENDENCY typescript@2.3.4

But i have the same error

ERROR in Error: Metadata version mismatch for module ..t/node_modules/ngx-treeview/src/index.d.ts, found version 4, expected 3, resolving symbol AppModule

any suggestion please @leovo2708 ?

maddy89 commented 6 years ago

I'm also getting the same error even with v2.0.1. Using Angular core 4.0.0

tonine1337 commented 6 years ago

Hi!

"dependencies": { "@angular/animations": "^4.2.4", "@angular/common": "^4.2.4", "@angular/compiler": "^4.2.4", "@angular/compiler-cli": "^4.4.6", "@angular/core": "^4.2.4", "@angular/forms": "^4.2.4", "@angular/http": "^4.3.4", "@angular/platform-browser": "^4.2.4", "@angular/platform-browser-dynamic": "^4.2.4", "@angular/platform-server": "^4.4.6", "@angular/router": "^4.2.4", "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.5", "@ngrx/core": "^1.2.0", "@ngrx/store": "^4.1.1", "angular2-jwt": "^0.2.3", "bootstrap": "^4.0.0-beta.2", "core-js": "^2.4.1", "jquery": "^3.2.1", "jwt-decode": "^2.2.0", "ng2-completer": "^1.6.3", "ngx-treeview": "^2.0.1", "popper.js": "^1.12.9", "rxjs": "^5.4.2", "tslint": "~5.7.0", "zone.js": "^0.8.14" },

this is my dependcies and I'm still facing the issue.

const3 commented 6 years ago

Updating all angular dependencies to 5.2.1 solved this issue for me, hope this help

maddy89 commented 6 years ago

Since I can't upgrade the Angular due to some other dependencies, I downgraded the plugin to "ngx-treeview": "^1.2.5" and that worked for me.

NextTrick commented 5 years ago

I have the same issue, @maddy89 Why do you choose ^1.2.5?

maddy89 commented 5 years ago

I think that's the only version that worked for me back then. I'm not really sure since this is some time back