package.json
{
"name": "sl-admin",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/cdk": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/material": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/platform-server": "^5.2.0",
"@angular/router": "^5.2.0",
"@covalent/core": "^1.0.0",
"@covalent/http": "^1.0.0",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"ngx-img-cropper": "^0.9.7",
"ngx-webstorage": "^2.0.1",
"rxjs": "^5.5.6",
"web-animations-js": "2.3.1",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "~1.7.3",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
}
StackBlitz template: https://stackblitz.com/edit/covalent
Plunker template: http://plnkr.co/edit/XhSrUWBw2RhCkXPoE4fn
Did this work in previous versions of Angular / Material?
ERROR in ../@covalent/core/covalent-core.ts(118,17): Error during template compile of 'TdNavigationDrawerComponent'
Function calls are not supported in decorators but 'TdCollapseAnimation' was called.
"$angular/animations": "^5.2.0",
"$angular/cdk": "^5.2.0",
"$angular/common": "^5.2.0",
"$angular/compiler": "^5.2.0",
"$angular/core": "^5.2.0",
"$angular/forms": "^5.2.0",
"$angular/http": "^5.2.0",
"$angular/material": "^5.2.0",
"$angular/platform-browser": "^5.2.0",
"$angular/platform-browser-dynamic": "^5.2.0",
"$angular/platform-server": "^5.2.0",
"$angular/router": "^5.2.0",
"$covalent/core": "^1.0.0",
"$covalent/http": "^1.0.0",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"ngx-img-cropper": "^0.9.7",
"ngx-webstorage": "^2.0.1",
"rxjs": "^5.5.6",
"web-animations-js": "2.3.1",
"zone.js": "^0.8.19"
I have the same error.
It seems related to angular/angular#14707
hmm, i wonder why this doesnt happen in our applications.. going to try a few things to see if i can replicate it.
Having the same error. Tried a little things to make it work, but got nothing.
Found out the problem. Updated typescript to version 2.6.2 and everything started working! :)
Awesome, thanks for the info!.. Gonna keep this PR open so other people can see the fix and add a faqs label
I changed the version to 2.6.2, but still not work while using "ng build --prod", even "ng build" always works fine.
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/cdk": "^5.2.4",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/material": "^5.2.4",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"@covalent/dynamic-forms": "^1.0.0",
"@covalent/highlight": "^1.0.0",
"@covalent/http": "^1.0.0",
"@covalent/markdown": "^1.0.0",
"core-js": "^2.4.1",
"jquery-autotab": "^1.9.2",
"rxjs": "^5.5.6",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "~1.7.3",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.6.2"
}
tsc -v
Version 2.6.2
Error:
ERROR in : Unexpected value 'CovalentLayoutModule in C:/.../src/app/app.module.ts'. Please add a @NgModule annotation.
@sunnyfly1990 im assuming its a cache issue.. i would recommend blowing away your node_modules dir and reinstalling.
@emoralesb05 Thanks a lot! Cleared the node_modules dir and reinstalled, all works fine now :) .
I am getting this issue:
"ERROR in ..//covalent-core.ts(118,17): Error during template compile of 'TdNavigationDrawerComponent'
Function calls are not supported in decorators but 'TdCollapseAnimation' was called."
when trying to analyze my project with ngrev (https://github.com/mgechev/ngrev). I have covalent 1.0.1, ts 2.6.2 and my prod build works fine.
We are probably gonna change the way we add animations into our components.. we cant replicate this issue, but its always an animation.
Most helpful comment
ERROR in ../@covalent/core/covalent-core.ts(118,17): Error during template compile of 'TdNavigationDrawerComponent'
Function calls are not supported in decorators but 'TdCollapseAnimation' was called.