ngx-chips: Can't resolve modules\components\icon.js
I’m submitting a … (check one with “x”)
[X ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request
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:
Message:
Error on fetch for ng2-tag-input/dist/modules/components/icon.js at file:///P:/Repositories/workspace_angular2/node_modules/ng2-tag-input/dist/modules/components/icon.js
Loading ng2-tag-input/dist/modules/ng2-tag-input.module.js
Loading dist\tmp\app\app.module.ngfactory.js
Loading dist\tmp\app\main-prod.js
ENOENT: no such file or directory, open 'P:\Repositories\workspace_angular2\node_modules\ng2-tag-input\dist\modules\components\icon.js'
Details:
originalErr: Error: ENOENT: no such file or directory, open 'P:\Repositories\workspace_angular2\node_modules\ng2-tag-input\dist\modules\components\icon.js'
Stack:
Error on fetch for ng2-tag-input/dist/modules/components/icon.js at file:///P:/Repositories/workspace_angular2/node_modules/ng2-tag-input/dist/modules/components/icon.js
Loading ng2-tag-input/dist/modules/ng2-tag-input.module.js
Loading dist\tmp\app\app.module.ngfactory.js
Loading dist\tmp\app\main-prod.js
Error: ENOENT: no such file or directory, open 'P:\Repositories\workspace_angular2\node_modules\ng2-tag-input\dist\modules\components\icon.js'
at Error (native)
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
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (7 by maintainers)
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
From what I see the problem is caused by the import inside the module.ts file. For some reason require(./components/icon) can not be resolved properly by system-js.
@Gbuomprisco is there any chance to bundle everything as amd bundle?