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

Does this still work with Angular 4? #10

Open
austinthedeveloper opened this issue Sep 26, 2017 · 5 comments
Open

Does this still work with Angular 4? #10

austinthedeveloper opened this issue Sep 26, 2017 · 5 comments

Comments

@austinthedeveloper
Copy link

I've been messing around with this project and no matter what I do, I'm getting this error when importing to my Angular 4+ project:

Unexpected value 'CountToModule' imported by the module 'AppModule'. Please add a @NgModule annotation.

I've tried getting this to work 2 different ways:

  • Build the original project with no modifications, link, and import the module into the project
  • Update the Angular packages to >=4.0.0, typescript to ~2.3.3, and reflect-metadata to ^0.1.10. The build succeeds. Run npm link on the dist folder.

Both are imported in the project the same way:
import { CountToModule } from 'angular-count-to';

@NgModule({
  ...
  imports [CountToModule]
  ...
});

Tslint-wise, there's no error because it's imported correctly. But as soon as I run ng-serve, I get the error above.

Are there additional instructions on how to import a module?

@alubeck
Copy link

alubeck commented Nov 3, 2017

Yeah, same issue here! I watched this issue while using node > version 8. WIth 7.9 all seems fine. What was your node setup @austinthedeveloper ?

@austinthedeveloper
Copy link
Author

I'm pretty sure it has to do with differences between Angular 2 and 4. I ended up going with another starter that does basically the same thing as this repo but works with 4. When I copy/pasted my exact code over to the new repo, it all worked.

@davguij
Copy link
Owner

davguij commented Nov 4, 2017

Thanks for reporting, @austinthedeveloper and @alubeck. This seed project is outdated indeed and probably some maintenance work needs to be done on my side for the new Angular / Node versions

@davguij davguij closed this as completed Nov 4, 2017
@davguij davguij reopened this Nov 4, 2017
@zt1983811
Copy link

@austinthedeveloper Could you send me the link of the other project starter repo please? Thanks

@austinthedeveloper
Copy link
Author

https://github.com/robisim74/angular-library-starter

I've built 2 modules with this one.

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

4 participants