querySelectorAll is not a function

if i use fontawesome and have it configured like that:
import fontawesome from '@fortawesome/fontawesome'
import {faBars, faFilePdf, faPrint, faDownload, faExpandArrowsAlt, faCogs, faEllipsisV} from<EMAIL_ADDRESS>import {faChartBar, faHeart} from<EMAIL_ADDRESS>
fontawesome.library.add(faBars, faFilePdf, faPrint, faDownload, faExpandArrowsAlt, faCogs, faEllipsisV);
fontawesome.library.add(faChartBar, faHeart);

in my stache file <can-import from="~/modules/fontawesome" />
i got an error
root.querySelectorAll is not a function
TypeError: root.querySelectorAll is not a function
	    at onTree (file:C:/wamp64/www/medicalpad/wwwroot/node_modules/@fortawesome/fontawesome/index.js:1365:33)
	    at Object.i2svg (file:C:/wamp64/www/medicalpad/wwwroot/node_modules/@fortawesome/fontawesome/index.js:1620:7)
	    at autoReplace (file:C:/wamp64/www/medicalpad/wwwroot/node_modules/@fortawesome/fontawesome/index.js:1754:52)
	    at Object.addPack (file:C:/wamp64/www/medicalpad/wwwroot/node_modules/@fortawesome/fontawesome/index.js:1784:7)
	    at define (file:C:/wamp64/www/medicalpad/wwwroot/node_modules/@fortawesome/fontawesome/index.js:1448:21)
	    at file:C:/wamp64/www/medicalpad/wwwroot/node_modules/@fortawesome/fontawesome/index.js:1484:9
	    at Array.forEach (<anonymous>)
	    at Library.add (file:C:/wamp64/www/medicalpad/wwwroot/node_modules/@fortawesome/fontawesome/index.js:1482:30)
	    at execute (file:C:/wamp64/www/medicalpad/wwwroot/src/modules/fontawesome.js!eval:23:27)
	    at doExecute (C:\wamp64\www\medicalpad\node_modules\steal\src\loader\loader-sans-promises.js:912:22)

can-simple-dom doesn't support querySelector / querySelectorAll. Given the complexity of selectors it would be non-trivial to support it.
I don't know too much about font-awesome (I thought that was a CSS thing), but would it be possible to simply not run the .add() functions when in SSR?

How can I prevent this

Could this be another place where we provide a function but write out a warning when it is called?
Sent from my iPhone

On Jun 7, 2018, at 3:08 PM, Julian<EMAIL_ADDRESS>wrote:
How can I prevent this
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@pYr0x I would imagine this would fix it:
// other imports
import isNode from "detect-node";

if(!isNode) {
  fontawesome.library.add(faBars, faFilePdf, faPrint, faDownload, faExpandArrowsAlt, faCogs, faEllipsisV);
  fontawesome.library.add(faChartBar, faHeart);
}

@justinbmeyer In the case of FormData I provided the warning the first time the getter is called. So yeah, same should happen here. Ideally with some links to documentation on how to work around.

@pYr0x Were you able to get this to work?

i have a conditional loading and exclude from beeing loaded on nodejs