Closed jbojcic1 closed 6 years ago
I am experiencing similar issues with
"@covalent/core": "^1.0.0-rc.3",
"@covalent/http": "^1.0.0-rc.3",
"@covalent/markdown": "^1.0.0-rc.3",
ng build itself works but when I run ng build --prod I get
ERROR in : Unexpected value 'CovalentChipsModule in G:/project1/node_modules/@covalent/core/covalent-core.d.ts' imported by the module 'CovalentModule in
G:/project1/src/app/lib/covalent/covalent.module.ts'. Please add a @NgModule annotation.
This error happens to all covalent modules. I did a folder comparison with an older version of covalent and figured out there is a difference in the core which could cause the issue:
https://github.com/Teradata/covalent/blob/develop/src/platform/core/index.ts
has
export * from './public-api';
however older version which works [ ng build --prod] successfully has
export * from './index'; export { IconService as ɵb } from './common/services/icon.service'; export { RouterPathService as ɵa } from './common/services/router-path.service';
for the time being I have coped and pasted the older @covalent package folder until a fix comes up.
@majhoos can you try using the latest? This was supposed to be fixed in rc.4.. but we are noticing people having some issues in AoT on certain cases.. so we want to be sure
@emoralesb05 , I upgraded to the new version and I can confirm that my issue got resolved. Many thanks.
Hey, I am having this issue as well with --aot:
"@angular/animations": "^5.2.0",
"@angular/cdk": "^5.2.3",
"@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.3",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"@covalent/core": "^1.0.0",
"@covalent/highlight": "^1.0.0",
"core-js": "^2.4.1",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
}```
ERROR in : Unexpected value 'CovalentCommonModule in /Users/finci/Development/sales-eng/sapb1/fe-admin/node_modules/@covalent/core/common/common.module.d.ts' imported by the module 'AppModule in /Users/finci/Development/sales-eng/sapb1/fe-admin/src/app/app.module.ts'. Please add a @NgModule annotation.
Hi! I'm having a related issue.
When i run ng build --prod --aot
, shows:
ERROR in : Unexpected value 'CovalentCommonModule in /PATH/node_modules/@covalent/core/common/common.module.d.ts' imported by the module 'CovalentDynamicFormsModule in /PATH/node_modules/@covalent/dynamic-forms/covalent-dynamic-forms.d.ts'. Please add a @NgModule annotation.
I am working with this 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/router": "^5.2.0",
"@covalent/core": "1.0.0-rc.4",
"@covalent/dynamic-forms": "1.0.0-rc.4",
"@covalent/highlight": "1.0.0-rc.4",
"@covalent/http": "1.0.0-rc.4",
"@covalent/markdown": "1.0.0-rc.4",
...`
I'll be very grateful if you can help me.
I have same issue with 1.0.0-rc.4. Even upgrade to the latest 1.0.0 would not help.
By upgrade typescript to 2.6.2, then it works fine.
ng build --prod
And i dosen't get a runtime error,cause there's no @Input in my code.
@cp1001 Upgrading typescript was the solution.
Thanks!
This is an issue with typescript. Upgrade typescript to version 2.6.2 in your project.
closing issue as resolved
Do you want to request a feature or report a bug?
Bug
My app seem to be working fine while running on the development server. But when I do prod build I am getting this error:
My package.json:
If I upgrade typescript to 2.6.2 as suggested here, prod build works fine but then I get a runtime error:
test-file.ts contains TestFile class and it's used in one of the components inputs:
@Input() file: TestFile | undefined;
Interesting thing is that error is gone if I remove | undefined and have only:
@Input() file: TestFile;