akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 875 forks source link

Metadata version mismatch for module /ng-app/node_modules/ng2-smart-table/ng2-smart-table.module.d.ts, found version 4, expected 3 #816

Open williamFalcon opened 6 years ago

williamFalcon commented 6 years ago

Here is the package.json.

{
  "name": "angular-starter",
  "version": "6.0.0",
  "description": "An Angular Webpack Starter kit featuring Angular (Router, Http, Forms, Services, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, TypeScript, and Webpack by AngularClass",
  "keywords": [
    "angular",
    "angular2",
    "angular4",
    "webpack",
    "typescript"
  ],
  "author": "Patrick Stapleton <patrick@angularclass.com>",
  "homepage": "https://github.com/AngularClass/angular-starter",
  "license": "MIT",
  "scripts": {
    "build:aot:prod": "npm run clean:dist && npm run clean:aot && cross-env BUILD_AOT=1 SOURCE_MAP=0 npm run webpack -- --config config/webpack.prod.js  --progress --profile --bail",
    "build:aot": "npm run build:aot:prod",
    "build:dev": "npm run clean:dist && npm run webpack -- --config config/webpack.dev.js --progress --profile",
    "build:docker": "npm run build:prod && docker build -t angular2-webpack-start:latest .",
    "build:prod": "npm run clean:dist && npm run webpack -- --config config/webpack.prod.js  --progress --profile --bail",
    "build": "npm run build:dev",
    "ci:aot": "npm run lint && npm run test && npm run build:aot && npm run e2e",
    "ci:jit": "npm run lint && npm run test && npm run build:prod && npm run e2e",
    "ci:nobuild": "npm run lint && npm test && npm run e2e",
    "ci:testall": "npm run lint && npm run test && npm run build:prod && npm run e2e && npm run build:aot && npm run e2e",
    "ci:travis": "npm run lint && npm run test && npm run build:aot && npm run e2e:travis",
    "ci": "npm run ci:testall",
    "clean:dll": "npm run rimraf -- dll",
    "clean:aot": "npm run rimraf -- compiled",
    "clean:dist": "npm run rimraf -- dist",
    "clean:install": "npm set progress=false && npm install",
    "clean": "npm cache clean --force && npm run rimraf -- node_modules doc coverage dist compiled dll",
    "docker": "docker",
    "docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/",
    "docs:compodoc": "compodoc -p tsconfig.json",
    "docs:compodoc:serve": "compodoc -p tsconfig.json -s",
    "docs:compodoc:serve:watch": "compodoc -p tsconfig.json -s -w",
    "e2e:live": "npm-run-all -p -r server:prod:ci protractor:live",
    "e2e:travis": "npm-run-all -p -r server:prod:ci protractor:delay",
    "e2e": "npm-run-all -p -r server:prod:ci protractor",
    "github-deploy:dev": "npm run webpack -- --config config/webpack.github-deploy.js --progress --profile --env.githubDev",
    "github-deploy:prod": "npm run webpack -- --config config/webpack.github-deploy.js --progress --profile --env.githubProd",
    "github-deploy": "npm run github-deploy:dev",
    "lint": "npm run tslint \"src/**/*.ts\"",
    "node": "node",
    "postinstall": "npm run webdriver:update",
    "postversion": "git push && git push --tags",
    "preclean:install": "npm run clean",
    "preversion": "npm test",
    "protractor": "protractor",
    "protractor:delay": "sleep 3 && npm run protractor",
    "protractor:live": "protractor --elementExplorer",
    "rimraf": "rimraf",
    "server:dev:hmr": "npm run server:dev -- --hotOnly",
    "server:dev": "npm run webpack-dev-server -- --config config/webpack.dev.js --open --progress --profile --watch --content-base src/",
    "server:hack": "npm run webpack-dev-server -- --config config/webpack.docker.js --open --progress --profile --content-base src/",
    "server:prod": "http-server dist -c-1 --cors",
    "server:prod:ci": "http-server dist -p 3000 -c-1 --cors",
    "server": "npm run server:dev",
    "start:hmr": "npm run server:dev:hmr",
    "start": "npm run server:dev",
    "test": "npm run lint && karma start",
    "tslint": "tslint",
    "typedoc": "typedoc",
    "version": "npm run build",
    "watch:dev:hmr": "npm run watch:dev -- --hot",
    "watch:dev": "npm run build:dev -- --watch",
    "watch:prod": "npm run build:prod -- --watch",
    "watch:test": "npm run test -- --auto-watch --no-single-run",
    "watch": "npm run watch:dev",
    "webdriver-manager": "webdriver-manager",
    "webdriver:start": "npm run webdriver-manager start",
    "webdriver:update": "webdriver-manager update",
    "webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
    "webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js"
  },
  "dependencies": {
    "@angular/animations": "~4.3.1",
    "@angular/common": "~4.3.1",
    "@angular/compiler": "~4.3.1",
    "@angular/core": "~4.3.1",
    "@angular/forms": "~4.3.1",
    "@angular/http": "~4.3.1",
    "@angular/platform-browser": "~4.3.1",
    "@angular/platform-browser-dynamic": "~4.3.1",
    "@angular/platform-server": "~4.3.1",
    "@angular/router": "~4.3.1",
    "@angularclass/hmr": "~2.1.3",
    "@angularclass/hmr-loader": "^3.0.4",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.6",
    "@types/csv-parse": "^1.1.11",
    "core-js": "^2.4.1",
    "http-server": "^0.9.0",
    "ie-shim": "^0.1.0",
    "ng-multiselect-dropdown": "^0.1.7",
    "ng2-smart-table": "^1.1.0",
    "papaparse": "^4.4.0",
    "reflect-metadata": "^0.1.10",
    "rxjs": "~5.0.2",
    "zone.js": "0.8.14"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~4.3.1",
    "@compodoc/compodoc": "^1.0.1",
    "@types/hammerjs": "^2.0.34",
    "@types/jasmine": "2.5.45",
    "@types/node": "^7.0.39",
    "@types/source-map": "^0.5.0",
    "@types/uglify-js": "^2.6.28",
    "@types/webpack": "^2.2.16",
    "add-asset-html-webpack-plugin": "^1.0.2",
    "angular2-template-loader": "^0.6.2",
    "assets-webpack-plugin": "^3.5.1",
    "awesome-typescript-loader": "~3.1.2",
    "codelyzer": "~2.1.1",
    "copy-webpack-plugin": "^4.0.1",
    "cross-env": "^5.0.0",
    "css-loader": "^0.28.0",
    "exports-loader": "^0.6.4",
    "expose-loader": "^0.7.3",
    "extract-text-webpack-plugin": "~3.0.0",
    "file-loader": "^0.11.1",
    "find-root": "^1.0.0",
    "gh-pages": "^1.0.0",
    "html-webpack-plugin": "^2.28.0",
    "imports-loader": "^0.7.1",
    "inline-manifest-webpack-plugin": "^3.0.1",
    "istanbul-instrumenter-loader": "2.0.0",
    "jasmine-core": "^2.5.2",
    "karma": "^1.6.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-coverage": "^1.1.1",
    "karma-jasmine": "^1.1.0",
    "karma-mocha-reporter": "^2.2.3",
    "karma-remap-coverage": "^0.1.4",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-webpack": "^2.0.4",
    "ng-router-loader": "^2.1.0",
    "ngc-webpack": "^3.2.0",
    "node-sass": "^4.5.2",
    "npm-run-all": "^4.0.2",
    "optimize-js-plugin": "0.0.4",
    "parse5": "^3.0.2",
    "preload-webpack-plugin": "^1.2.2",
    "protractor": "^5.1.1",
    "raw-loader": "0.5.1",
    "rimraf": "^2.6.2",
    "sass-loader": "^6.0.3",
    "script-ext-html-webpack-plugin": "^1.8.5",
    "source-map-loader": "^0.2.1",
    "string-replace-loader": "~1.3.0",
    "style-loader": "^0.18.1",
    "to-string-loader": "^1.1.5",
    "ts-node": "^3.3.0",
    "tslib": "^1.7.1",
    "tslint": "~4.5.1",
    "tslint-loader": "^3.5.2",
    "typedoc": "^0.7.1",
    "typescript": "~2.2.2",
    "uglifyjs-webpack-plugin": "^0.4.6",
    "url-loader": "^0.5.8",
    "webpack": "^3.6.0",
    "webpack-dev-middleware": "^1.10.1",
    "webpack-dev-server": "~2.7.1",
    "webpack-dll-bundles-plugin": "^1.0.0-beta.5",
    "webpack-merge": "~4.1.0"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/AngularClass/angular-starter.git"
  },
  "bugs": {
    "url": "https://github.com/AngularClass/angular-starter/issues"
  },
  "engines": {
    "node": ">= 4.2.1",
    "npm": ">= 3"
  }
}
tishma commented 6 years ago

+1. I have: "ng2-smart-table": "^1.2.1"

josead commented 6 years ago

I had to downgrade but it worked:

"ng2-smart-table": "1.2.0" // notice exact version without ^

nedssteven commented 6 years ago

i have the same problem. so how to downgrade ng2-Smart-table version

josead commented 6 years ago

@nedssteven You do remove it first

npm uninstall ng2-smart-table then you add the specific version npm install ng2-smart-table@1.2.0

// package.json shuold look like this
...
    "dependencies": {
         ...
         "ng2-smart-table": "1.2.0", 
         ...
...
nedssteven commented 6 years ago

Of course i did it. The problem isthat i have updated my npm with << npm update>> since ng2-smart-table went to 1.3.4 version. When i try to remove the actual version with <<npm uninstall -ng2-smart-table --save>> It shows that packages has been removed but when i try << npm view ng2-smart-table version>> it always shows version 1.374

nedssteven commented 6 years ago

// package.json looks like this ... "ng2-search-filter": "^0.4.7", "ng2-select": "^2.0.0", "ng2-smart-table": "^1.3.3", "ng2-smart-table-extended": "^1.0.19", "ng2-social-share": "0.0.10", "ngx-bootstrap": "^3.0.1", ........ } not yet working because of the mismatch version of ng2-smart-table

nedssteven commented 6 years ago

ERROR in Error: Metadata version mismatch for module C:/Workspace/DESTINYBACKOFFICE/node_modules/ng2-smart-table/index.d.ts, found version 4, expected 3, resolving symbol AppModule in C:/Workspace/DESTINYBACKOFFICE/src/app/app.module.ts, resolving symbol AppModule in C:/Workspace/DESTINYBACKOFFICE/src/app/app.module.ts at syntaxError (C:\Workspace\DESTINYBACKOFFICE\node_modules\@angular\compiler\bundles\compiler.umd.js:1729:34) at simplifyInContext (C:\Workspace\DESTINYBACKOFFICE\node_modules\@angular\compiler\bundles\compiler.umd.js:25118:23) at StaticReflector.simplify (C:\Workspace\DESTINYBACKOFFICE\node_modules\@angular\compiler\bundles\compiler.umd.js:25130:13) at StaticReflector.annotations (C:\Workspace\DESTINYBACKOFFICE\node_modules\@angular\compiler\bundles\compiler.umd.js:24558:41) at _getNgModuleMetadata (C:\Workspace\DESTINYBACKOFFICE\node_modules\@angular\compiler-cli\src\ngtools_impl.js:138:31) at _extractLazyRoutesFromStaticModule (C:\Workspace\DESTINYBACKOFFICE\node_modules\@angular\compiler-cli\src\ngtools_impl.js:109:26) at Object.listLazyRoutesOfModule (C:\Workspace\DESTINYBACKOFFICE\node_modules\@angular\compiler-cli\src\ngtools_impl.js:53:22) at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Workspace\DESTINYBACKOFFICE\node_modules\@angular\compiler-cli\src\ngtools_api.js:91:39) at AotPlugin._getLazyRoutesFromNgtools (C:\Workspace\DESTINYBACKOFFICE\node_modules\@ngtools\webpack\src\plugin.js:207:44) at _donePromise.Promise.resolve.then.then.then.then.then (C:\Workspace\DESTINYBACKOFFICE\node_modules\@ngtools\webpack\src\plugin.js:443:24) at at process._tickCallback (internal/process/next_tick.js:188:7)

josead commented 6 years ago

@nedssteven try modifying the package.json like this: - "ng2-smart-table": "^1.3.3", // remove this line + "ng2-smart-table": "1.2.0", // add this line and run npm install again

nedssteven commented 6 years ago

@josead thanks but it doesn't work This is the output error ERROR in Error: Metadata version mismatch for module C:/Workspace/DESTINYBACKOFFICE/node_modules/ng2-smart-table/index.d.ts, found version 4, expected 3, resolving symbol AppModule in C:/Workspace/DESTINYBACKOFFICE/src/app/app.module.ts, resolving symbol AppModule in C:/Workspace/DESTINYBACKOFFICE/src/app/app.module.ts at syntaxError (C:\Workspace\DESTINYBACKOFFICE\node_modules@angular\compiler\bundles\compiler.umd.js:1729:34) at simplifyInContext (C:\Workspace\DESTINYBACKOFFICE\node_modules@angular\compiler\bundles\compiler.umd.js:25118:23) at StaticReflector.simplify (C:\Workspace\DESTINYBACKOFFICE\node_modules@angular\compiler\bundles\compiler.umd.js:25130:13) .................................................

chetanbirajdar commented 5 years ago

Does ng2-smart-table extended work in angular 6 ?

check this for reference

https://jkon.github.io/ng2-smart-table

lorranpalmeira commented 5 years ago

I have a big problem, because I am current 4.3 version of Angular and i have the same problem when i back to version 1.2.0, i have errors because this version needs http from angular.