I'm receiving the following error when trying to SSR with fontawesome:
Cannot read property 'doScroll' of undefined
as node_modules/@fortawesome/fontawesome/index.js:192:39
Looks like this line is being executed when DOCUMENT is undefined:
var loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
Yep, I know what that is. My dumb mistake. I'll get to this quickly when we get back from holiday break.
For nuxt users I just rolled back a version and things were rendering again:
package.json
"@fortawesome/fontawesome": "=1.0.1",
"@fortawesome/vue-fontawesome": "=0.0.21",
Is there any chance that you could prioritize this?
There is also a DOCUMENT.documentElement.classList
in node_modules/@fortawesome/fontawesome/index.js:1335
that mess SSR
Is this the reason why fontawesome 5 icons are not rendering on VueJs?
We'll be releasing some fixes for SSR hopefully today.
1.1.3 should take care of all the SSR issues. Please let me know if you run into any more troubles.
Most helpful comment
Yep, I know what that is. My dumb mistake. I'll get to this quickly when we get back from holiday break.