Teradata / covalent

Teradata UI Platform built on Angular Material
https://teradata.github.io/covalent/
MIT License
2.23k stars 356 forks source link

Metadata version mismatch for module PROJECT_PATH/node_modules@covalent/code-editor/covalent-code-editor.d.ts, found version 4, expected 3, resolving symbol ComponentsModule #1141

Closed dcarrask closed 6 years ago

dcarrask commented 6 years ago

found version 4, expected 3, resolving symbol ComponentsModule

Hi there!

I created an app with angular and covalent time ago. I've been developing it for long time. It happens that now, when I've tried to install it in another machine I realized I had a problem. I'm trying to solve it since four days and I still not knowing what should I do for it to run.

This is what I get when I execute ng serve

ng serve
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2018-04-17T11:25:07.655Z
Hash: 0e59115234bd4a862168
Time: 17887ms
chunk {inline} inline.bundle.js (inline) 3.85 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 1.96 MB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 1.08 MB [initial] [rendered]
chunk {scripts} scripts.bundle.js (scripts) 104 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 2.2 MB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 15.1 MB [initial] [rendered]

ERROR in Error: Metadata version mismatch for module PROJECT_PATH/node_modules/@covalent/code-editor/covalent-code-editor.d.ts, found version 4, expected 3, resolving symbol ComponentsModule in PROJECT_PATH/src/app/components/components/components.module.ts, resolving symbol ComponentsModule in PROJECT_PATH/src/app/components/components/components.module.ts
    at syntaxError (PROJECT_PATH/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
    at simplifyInContext (PROJECT_PATH/node_modules/@angular/compiler/bundles/compiler.umd.js:24979:23)
    at StaticReflector.simplify (PROJECT_PATH/node_modules/@angular/compiler/bundles/compiler.umd.js:24991:13)
    at StaticReflector.annotations (PROJECT_PATH/node_modules/@angular/compiler/bundles/compiler.umd.js:24418:41)
    at _getNgModuleMetadata (PROJECT_PATH/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
    at _extractLazyRoutesFromStaticModule (PROJECT_PATH/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
    at includeLazyRouteAndSubRoutes (PROJECT_PATH/node_modules/@angular/compiler-cli/src/ngtools_impl.js:66:25)
    at Array.reduce (<anonymous>)
    at Object.listLazyRoutesOfModule (PROJECT_PATH/node_modules/@angular/compiler-cli/src/ngtools_impl.js:54:36)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (PROJECT_PATH/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (PROJECT_PATH/node_modules/@ngtools/webpack/src/plugin.js:240:66)
    at _donePromise.Promise.resolve.then.then.then.then.then (PROJECT_PATH/node_modules/@ngtools/webpack/src/plugin.js:493:24)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

I'm trying whatever but I see myself far of any kind of solution. I understand is a compatibility problem about versions but I don't understand the logs. What version of what package?

Sorry about my ignorance, maybe is something super simple to fix but I don't know how to do it.

Here it is the package.json of the app in case it helps...

{
  "name": "covalent",
  "version": "1.0.0-beta.8-1",
  "private": true,
  "description": "Teradata UI Platform built on Angular Material",
  "keywords": [
    "angular",
    "components",
    "reusable"
  ],
  "scripts": {
    "e2e": "protractor",
    "e2e-test": "protractor ./protractor.conf.js",
    "lint": "tslint --format codeFrame -c ./tslint.json \"./src/**/*.ts\" -e \"./src/**/typings.d.ts\" -e \"./src/environments/**\"",
    "postinstall": "ng build --aot -prod",
    "reinstall": "rm -rf node_modules tmp deploy dist && npm i",
    "webdriver-update": "bash ./node_modules/.bin/webdriver-manager update",
    "test": "ng test --code-coverage --single-run --sourcemap=false",
    "coverage-win": "start chrome ./coverage/index.html",
    "coverage-mac": "open -a \"Google Chrome\" coverage/index.html",
    "coveralls": "cat ./coverage/lcov.info | node ./node_modules/coveralls/bin/coveralls.js",
    "bump-dev": "gulp bump-version",
    "bump-patch": "gulp bump-version --ver patch",
    "bump-minor": "gulp bump-version --ver minor",
    "bump-major": "gulp bump-version --ver major",
    "aot": "./node_modules/.bin/ngc -p deploy/platform/tsconfig-aot.json && tsc -p src/platform/tsconfig-aot.json",
    "build": "bash scripts/build-release",
    "npm-publish": "npm run build && bash scripts/npm-publish",
    "nightly-publish": "npm run build && bash scripts/nightly-publish",
    "ghpages-deploy": "./node_modules/.bin/ng build --base-href /covalent/ --aot -prod --sourcemap=false && bash scripts/ghpages-deploy",
    "start-release": "bash scripts/start-release",
    "finish-release": "bash scripts/finish-release",
    "combat-training": "bash scripts/combat-training",
    "heroku-prebuild": "echo This runs before Heroku installs your dependencies.",
    "heroku-postbuild": "echo This runs afterwards.",
    "start": "node server.js"
  },
  "engines": {
    "node": "7.10.0",
    "npm": "3.10.10"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/teradata/covalent.git"
  },
  "bugs": {
    "url": "https://github.com/teradata/covalent/issues"
  },
  "license": "MIT",
  "author": "Teradata UX",
  "contributors": [
    "Kyle Ledbetter <kyle.ledbetter@teradata.com>",
    "Richa Vyas <richa.vyas@teradata.com>",
    "Ed Morales <eduardo.morales@teradata.com>",
    "Jason Weaver <jason.weaver@teradata.com>",
    "Jeremy Wilken <jeremy.wilken@teradata.com>",
    "Jeremy Smartt <jeremy.smartt@teradata.com>",
    "Ilsun Park <ilsun.park@teradata.com>",
    "Steven Ov <steven.ov@teradata.com>"
  ],
  "browserslist": [
    "last 2 versions",
    "ie 11"
  ],
  "dependencies": {
    "@angular-devkit/schematics": "0.0.34",
    "@angular/animations": "^4.4.3",
    "@angular/cdk": "^2.0.0-beta.12",
    "@angular/cli": "1.4.2",
    "@angular/common": "^4.4.3",
    "@angular/compiler": "^4.4.3",
    "@angular/compiler-cli": "^4.4.3",
    "@angular/core": "^4.4.3",
    "@angular/forms": "^4.4.3",
    "@angular/http": "^4.4.3",
    "@angular/material": "^2.0.0-beta.12",
    "@angular/platform-browser": "^4.4.3",
    "@angular/platform-browser-dynamic": "^4.4.3",
    "@angular/platform-server": "^4.4.3",
    "@angular/router": "^4.4.3",
    "@covalent/chips": "^0.9.1",
    "@covalent/code-editor": "^1.0.0-beta.1",
    "@covalent/core": "^1.0.0",
    "@covalent/dynamic-forms": "^1.0.0",
    "@covalent/highlight": "^1.0.0",
    "@covalent/http": "^1.0.0",
    "@covalent/markdown": "^1.0.0",
    "@covalent/search": "^0.9.1",
    "@covalent/text-editor": "^1.0.0-alpha.4",
    "@ngx-translate/core": "8.0.0",
    "@ngx-translate/http-loader": "1.0.2",
    "@swimlane/ngx-charts": "5.3.1",
    "angular2-qrscanner": "^0.1.12",
    "angular2-virtual-scroll": "^0.3.2",
    "classlist.js": "^1.1.20150312",
    "core-js": "^2.4.1",
    "d3": "^4.4.0",
    "express": "^4.16.2",
    "hammerjs": "^2.0.8",
    "highlight.js": "9.11.0",
    "ng2-clipboard": "^1.0.35",
    "ngx-gallery": "^3.1.1",
    "ngx-infinite-scroll": "^0.8.3",
    "ngx-scroll-event": "^1.0.8",
    "ramda": "^0.25.0",
    "require-dir": "^1.0.0",
    "rxjs": "^5.5.2",
    "showdown": "1.6.4",
    "ts-clipboard": "^1.0.15",
    "tslib": "^1.7.1",
    "typescript": "~2.3.2",
    "web-animations-js": "2.3.1",
    "webdriver-manager": "^12.0.6",
    "zone.js": "^0.7.8"
  },
  "devDependencies": {
    "@types/fs-extra": "^4.0.0",
    "@types/hammerjs": "^2.0.30",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.60",
    "@types/selenium-webdriver": "^2.52.0",
    "autoprefixer": "7.1.2",
    "codelyzer": "~3.0.0",
    "coveralls": "^2.12.0",
    "fs-extra": "^4.0.0",
    "glob": "^6.0.4",
    "gulp": "3.9.1",
    "gulp-bump": "2.1.0",
    "gulp-help": "1.6.1",
    "gulp-if": "2.0.1",
    "gulp-postcss": "7.0.0",
    "gulp-sass": "3.1.0",
    "gulp-sourcemaps": "1.6.0",
    "gulp-typescript": "3.1.4",
    "gulp-util": "3.0.7",
    "jasmine-core": "~2.5.2",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^0.3.0",
    "karma-firefox-launcher": "^1.0.1",
    "karma-jasmine": "^1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-phantomjs-launcher": "1.0.1",
    "merge2": "1.0.2",
    "node-sass": "^4.7.2",
    "phantomjs-prebuilt": "2.1.14",
    "protractor": "~5.1.0",
    "rollup": "^0.41.6",
    "rollup-plugin-commonjs": "8.0.2",
    "rollup-plugin-node-resolve": "^3.0.0",
    "semver": "5.2.0",
    "ts-node": "^3.0.4",
    "tslint": "5.2.0",
    "uglify-js": "^2.8.14"
  }
}
jeremysmartt commented 6 years ago

Looks like you are on Angular 4 but have the carrot on the code editor: "@covalent/code-editor": "^1.0.0-beta.1", Which will give you the latest code-editor that is using Angular 6.

If you want to stay on Angular 4 then use this Code Editor dependency (remove the carrot to peg to the version): "@covalent/code-editor": "1.0.0-beta.1",