-
Notifications
You must be signed in to change notification settings - Fork 359
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
Can't resolve modules\components\icon.js #331
Comments
Check out Gbuomprisco/ng2-material-dropdown#23 (comment), it could help? |
I'm having the same problem with the angular seed project of mgechev. My SystemJS config looks like the following:
I also tried to add the template you suggested:
I still receive the same error:
@Gbuomprisco sorry, the commet you linked didn't help me. Anyone has any suggestion how to solve this issue? |
I would honestly ask this question on the seed's repo instead. Webpack works, Angular cli too, it's just SystemJS based configs that always have something wrong. Sorry I can't help more than this |
I also opened an issue in the Angular seed project. It would still be great if someone proposes a solution here. |
Thanks. Just reading here https://github.com/mgechev/angular-seed/wiki/Add-external-dependency. Can you try:
and if it won't work, try adding
|
Thanks for your answer @Gbuomprisco. The error message is still the same, nothing did change. |
From what I see the problem is caused by the import inside the module.ts file. @Gbuomprisco is there any chance to bundle everything as amd bundle? |
Hi @ZuSe, it is a UMD bundle (so should work with any type of config). Sorry if archive this, but I don't honestly think the issue is in the package. I'll keep helping regardless - but I haven't used SystemJS in a long while |
As you cannot provide an AMD bundle and the imports are not working with the SystemJS build of the Angular 2 Seed project, i decided to kick out the library and use angular2-tag-input instead. |
@Gbuomprisco |
I am also using the latest of mgechev's seed project that uses SystemJS. I never had issues with the icon, but I did have issues getting the template to show correctly. It would always show empty tags and no page errors were ever displayed. I got this to work by specifying my own tag template manually in my component template. Hopefully this help anyone who has my issue. I have no advice on the icon problem besides making sure your seed project is up to date. I'm using the exact same configs as JunusErgin. I'm also using latest Chrome. I'm not sure what else it could be. Edit: I'll also mention that I don't see any "node_modules/ng2-tag-input/dist/modules/components/icon.js" as I only see "node_modules/ng2-tag-input/dist/modules/components/icon/icon.js". I don't know why it's looking for the first path for you. Edit 2: So related to my issue, I had to import BrowserAnimationsModule in my module to get my tags to work correctly. Related to this issue #325 |
Thanks very much for helping on this @chrisbmoore |
@chrisbmoore Are you using the aot build in the seed project? I only get it there, normal build works as it should. |
@chrisbmoore @Gbuomprisco Just to reproduce it on a plain seed project with running build.prod.aot as it's predefined |
@ZuSe I haven't tried AoT yet, but it does build and work for me on normal dev and prod build/serve commands. I'll try AoT when I get home. Your setup seems to match mine exactly too. That is strange. |
Looks like the issue is that SystemJS doesn't understand barrel files like https://github.com/Gbuomprisco/ng2-tag-input/blob/master/modules/ng2-tag-input.module.ts#L5. So thinks icon is icon.js, but instead is icon/index.ts |
Any update on this? I'd like to use the library, but I can't use it with SystemJS while it's still using barrel imports. |
@bnormoyle no, sorry. I recommend using Webpack or the cli |
I'm submitting a ... (check one with "x")
Current behavior
We are using ng2-tag-input version 1.0.5 in our angular-seed based project.
When we try to use the aot compile we get the following issue:
I have added the deps to systemjs config as described in the readme, but it seems to have no effect.
I would really appreciate any advise.
Best Regards,
ZuSe
The text was updated successfully, but these errors were encountered: