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 error #127

Closed
mick88 opened this issue Jul 4, 2019 · 7 comments
Closed

ng build error #127

mick88 opened this issue Jul 4, 2019 · 7 comments

Comments

@mick88
Copy link

mick88 commented Jul 4, 2019

I'm getting the following error when building my project since adding this library:

ERROR in : Unexpected value 'LoggerTestingModule in /media/ssd/gitlab-ci/builds/d2697ae0/0/mat/mat-client-ts/node_modules/ngx-logger/ngx-logger.d.ts' imported by the module 'TestingModule in /media/ssd/gitlab-ci/builds/d2697ae0/0/mat/mat-client-ts/src/app/testing.module.ts'. Please add a @NgModule annotation.

I have my own testing module which I use for most common imports. The above error is a result of attempting to import LoggerTestingModule to that module.

I'm using version 3.4.5 of the library. Angular CLI 6.2.1, Node 8.12.0

@viceice
Copy link
Contributor

viceice commented Jul 18, 2019

Me too:


BUILD ERROR
: Unexpected value 'LoggerTestingModule in /src/proj/node_modules/ngx-logger/ngx-logger.d.ts' imported by the module 'CoreTestingModule in /src/proj/libs/core/testing/src/lib/core-testing.module.ts'. Please add a @NgModule annotation.
: Can't export value LoggerTestingModule in /src/proj/node_modules/ngx-logger/ngx-logger.d.ts from CoreTestingModule in /src/proj/libs/core/testing/src/lib/core-testing.module.ts as it was neither declared nor imported!

An unhandled exception occurred: : Unexpected value 'LoggerTestingModule in /src/proj/node_modules/ngx-logger/ngx-logger.d.ts' imported by the module 'CoreTestingModule in /src/proj/libs/core/testing/src/lib/core-testing.module.ts'. Please add a @NgModule annotation.
: Can't export value LoggerTestingModule in /src/proj/node_modules/ngx-logger/ngx-logger.d.ts from CoreTestingModule in /src/proj/libs/core/testing/src/lib/core-testing.module.ts as it was neither declared nor imported!

Looks like the metadata for that module is invalid. The testing module should declare a secondary entrypoint

@viceice
Copy link
Contributor

viceice commented Jul 18, 2019

found it: ng-packagr/ng-packagr#195

i can send a pr to fix that

@viceice viceice mentioned this issue Jul 18, 2019
@dbfannin
Copy link
Owner

Thanks @viceice! This should be fixed in ngx-logger@4.0.0. Can you please verify this for me and close the ticket?

@viceice
Copy link
Contributor

viceice commented Jul 18, 2019

Verified 👍, please close. I'm not allowed to close.

@viceice
Copy link
Contributor

viceice commented Jul 18, 2019

Latest version 3.x has worked too.

@dbfannin
Copy link
Owner

Thanks!

@viceice
Copy link
Contributor

viceice commented Jul 19, 2019

Thanks for fast publishing the fix. 🎉

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

No branches or pull requests

3 participants