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

Unexpected value 'SeedModule' imported by the module 'AppModule'. Please add a @NgModule annotation. #8

Open
ghost opened this issue Aug 8, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 8, 2017

I followed all the steps you described, up to npm link from dist folder and npm link angular-npm-module-seed in the root folder of the project where I want to use my custom component. Linking seems to work fine as I see the code inside npm_modules.

After that I imported the SeedModule inside my test app's AppModule (which uses Angular 4).
However I can't run my application anymore. The browser console logs the following error:
Unexpected value 'SeedModule' imported by the module 'AppModule'. Please add a @NgModule annotation.

Any idea?

@OutlierFinance
Copy link

I think this issue is related to an update of node or npm. Previously when searching for dependencies it would treat symlinked files as though they were in the linked location but new versions search upwards from the source location for node_modules.

This tripped me up for a long time too but I found this thread with some workarounds (linked directly to most relevant comment): angular/angular#15763 (comment)

@playground
Copy link

I'm having the same issue. I filed an issue here filipesilva/angular-quickstart-lib#55

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

2 participants