Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng build --prod error with rc3 #1099

Closed
j-walker23 opened this issue Jan 22, 2018 · 12 comments · Fixed by #1104 or #1113
Closed

ng build --prod error with rc3 #1099

j-walker23 opened this issue Jan 22, 2018 · 12 comments · Fixed by #1104 or #1113

Comments

@j-walker23
Copy link

Bug Report

Upgraded to rc3 and ng build --prod errors out.
ng serve and ng build do work though.
I have a NgModule where i am importing the various Cov modules. There are two diff errors.

First is @NgModule({exports: [...CovModules]}).
ERROR in : Can't export value CovalentCommonModule in @covalent/core/common/common.module.d.ts from CovModule in apps/web/src/app/shared/cov.module.ts as it was neither declared nor imported!

If I change my NgModule to import Cov modules as well as export.
@NgModule({imports: [...CovModules], exports: [...CovModules]}).
I get the other error.
ERROR in : Unexpected value 'CovalentLayoutModule in @covalent/core/covalent-core.d.ts' imported by the module 'CovModule in apps/web/src/app/shared/cov.module.ts'. Please add a @NgModule annotation.

Which version of Angular and Material, and which browser and OS does this issue affect?

    "@angular/animations": "^5.1.1",
    "@angular/cdk": "^5.1.0",
    "@angular/common": "^5.1.1",
    "@angular/compiler": "^5.1.1",
    "@angular/core": "^5.1.1",
    "@angular/flex-layout": "^2.0.0-beta.12",
    "@angular/forms": "^5.1.1",
    "@angular/material": "^5.1.0",

Thanks for the cool lib!

@emoralesb05
Copy link
Contributor

emoralesb05 commented Jan 23, 2018

Yes, we are aware of this issue and working on debugging and finding out why.. we will release an RC.4 as soon as we fix it.

Will keep track of the progress in this issue 😄

@j-walker23
Copy link
Author

Awesome thanks! Sorry if this was a duplicate. I tried looking first.
Also, curious on how you guys prefer to be notified with one off things like this.
Through gitter or regular issue like this?

@emoralesb05
Copy link
Contributor

We prefer an issue here in the repo since if its done via gitter it might get lost in a conversation or we might not be aware of it.

So thanks for the report! 😄

@prescindivel
Copy link

Hi guys, I got this problem, do you have any updates on progress or some way to fix it while an RC.4 does not released? Thanks.

@emoralesb05
Copy link
Contributor

We are working on the fix for this.. we think we found the issue so we are gonna test this today and hopefully release an RC.4 with this fix ASAP.

@emoralesb05
Copy link
Contributor

Can you all test with the nightly build please? We already did some preliminary tests, but wanna make sure its all good to go.

@drakir
Copy link

drakir commented Jan 31, 2018

Hi,
I have the same problem in rc4, and even tried the nightly build
https://github.com/Teradata/covalent-nightly.git#e903e450433b87106bb48adcc10158d66032bd64

and got the same error in that build too.

Unexpected value 'CovalentLayoutModule....Please add a @NgModule annotation.

@emoralesb05
Copy link
Contributor

can you clear your node_modules and try again? we have tested this already in 4 different products and havent run into any issues.

@drakir
Copy link

drakir commented Feb 1, 2018

Yes I've done that.

I created a completely new angular project with angular material and covalent, latest of what is released this morning, and I get the same error.

If i do an import like suggested in the documentation
import {CovalentLayoutModule} from '@covalent/core/layout';

This error is thrown when executing ng build --prod
ERROR in : Unexpected value 'CovalentLayoutModule in /Users/rikard/dev/test/my-app/node_modules/@covalent/core/layout/layout.module.d.ts' imported by the module 'AppModule in /Users/rikard/dev/test/my-app/src/app/app.module.ts'. Please add a @NgModule annotation.

Now if I instead import the module from import {CovalentLayoutModule} from '@covalent/core'; like it was in previous versions (such as rc2), the error will be:

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.

Am I doing something wrong?
I am using node 8.9.4 and npm 5.6.0.

@drakir
Copy link

drakir commented Feb 1, 2018

Check here @emoralesb05 .
I´ve uploaded it to a public repo: https://github.com/drakir/demo-covalent

@emoralesb05
Copy link
Contributor

Cool, let me debug it and see what the issue could be.

@emoralesb05
Copy link
Contributor

hmm.. Ok for sooome reason the typescript version its at fault here.. where 2.5.3 gives that error while ~2.6.2 is ok.. Im wondering if its because we compiled the release with 2.6.2.

Anyway.. just tried it and if you update the typescript dependency from ~2.5.3 to ~2.6.2

Gonna mention it in the docs so people are aware of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants