Font-awesome: SSR issue with @forawesome/fontawesome 1.1.0

Created on 22 Dec 2017  路  7Comments  路  Source: FortAwesome/Font-Awesome

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);

bug

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.

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marceloverdijk picture marceloverdijk  路  163Comments

ghost picture ghost  路  161Comments

QuincyLarson picture QuincyLarson  路  308Comments

tinyoverflow picture tinyoverflow  路  402Comments

mitch621 picture mitch621  路  180Comments