ERROR No svg with name 'xxxx' has been loaded with Angular SSR
RRGT19 opened this issue · 2 comments
Angular CLI: 11.2.10
Node: 14.15.5
OS: darwin x64
Angular: 11.2.11
Ivy Workspace: Yes
I'm using the angular-svg-icon-preloader to load my icons.
I have read and followed the "Usage with Angular Universal" to make it work with SSR. I followed and copy the implementation on the demo-universal-angular-svg-loader. It's working and the icons are showing up, but, when my server starts to receive requests, I get these errors in the console:
An error occurred loading the icons:
NetworkError
at XMLHttpRequest.send (/webapp/dist/web-app/server/main.js:102530:19)
at Observable._subscribe (/webapp/dist/web-app/server/main.js:188462:17)
No icons will be loaded.
ERROR No svg with name 'xxxxx' has been loaded
Maybe there is an issue with the angular-svg-icon-preloader and SSR?
When I open my App using SSR, I see these requests:
Notice that there is one request to load my icons.json file and then, all my .svg files. This is normal? I don't know what is the cause of my errors in console.
It might be better to redirect this issue to angular-svg-icon-preloader project and ask about how it works with SSR.
It might be better to redirect this issue to angular-svg-icon-preloader project and ask about how it works with SSR.
I have posted the issue there, didn't know how to redirect or place the issue there without copy/paste the description. I think we can close or delete this post to avoid confusion and duplicates.