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

Showing error when I import "ShareButtonsModule" in application #17

Closed
binalpanchal27 opened this issue Dec 23, 2016 · 5 comments
Closed
Milestone

Comments

@binalpanchal27
Copy link

Showing below error like,
"ShareButtonsModule is not an NgModule"

Please help me out for this error.

@MurhafSousli
Copy link
Owner

Hi @Binal24, Have you upgraded angular-cli to 1.0.0-beta.24? Check this

@MurhafSousli MurhafSousli modified the milestone: 1.2 Dec 23, 2016
@MurhafSousli
Copy link
Owner

This package needs to be recompiled, by the time I push the new updates you can use the source typescript in your project

@binalpanchal27
Copy link
Author

Yes I am using angular-cli 1.0.0-beta.24 version.
Its showing Module error, but its working.
But my concern is, Is there any issue happens by this error after publishing my application?

@MurhafSousli
Copy link
Owner

@Binal24 I don't think so, but next release will ship typescript files instead of compiled ones to avoid such issues in the future

@tinesoft
Copy link
Contributor

tinesoft commented Jan 3, 2017

Hi @MurhafSousli,

Regarding this issue, the recommenced solution is to publish the .metadata.json files along with the .d.ts files (see @hansl's comment.

To do so, you must use the @angular/compiler-cli (ngc), which is a drop-in replacement for Typescript compiler (tsc) with some additional Angular magic, like generating those modules metadata and being AoT compliant.

I have a working PR ready to push if you want (tested with latest angular-cli v1.0.0-beta-24)

Cheers

tinesoft added a commit to tinesoft/ngx-sharebuttons that referenced this issue Jan 3, 2017
- ts files are now compiled with `@angular/compiler-cli` (ngc) instead of tsc
- `*.metadata.json` are now published along with `*.d.ts files` (Fixes MurhafSousli#17)
- `index.ts` have been renamed into `share-buttons.module.ts` and moved to `src` folder
- new `index.ts` importing the `share-buttons.module.ts` has been added to `src` folder
- gulp tasks have been reorganized and useless plugin removed (merge2 sourcemaps,...)
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