Can't resolve modules\components\icon.js
See original GitHub issueI’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
Issue Analytics
- State:
- Created 6 years ago
- Comments:18 (7 by maintainers)
Top Results From Across the Web
Can't resolve module (not found) in React.js - Stack Overflow
It seems you need import Header from './components/header/header' w/o src. File path is relative to importing file path. Then you need to export ......
Read more >Module not found: Can't resolve 'react-icons' error | bobbyhadz
Conclusion # To solve the error "Module not found: Error: Can't resolve 'react-icons'", make sure to install the react-icons package by opening your...
Read more >Module not found: Error: Can't resolve 'Components/Icon' #125
Icon this is component which insert icon in menu bar, you can find this in example/component and import in your project.
Read more >React Error: Module not found: Can't resolve '@material-ui ...
React. ✓ Solved: React Error: Module not found: Can't resolve '@material-ui/ icons /Edit' in component. js. 24K views 1 year ago React.
Read more >Module not found | Can not resolve module in react - YouTube
Your browser can't play this video. ... Module not found | Can not resolve module in react ... 21K views 1 year ago...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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?