kadirahq / react-mounter

A simple way to mount React components
MIT License
130 stars 37 forks source link

Running on the server #6

Closed SachaG closed 8 years ago

SachaG commented 8 years ago

I wanted to share my router file between client and server, and ran into the following error:

ReferenceError: document is not defined
    at node_modules/domready/ready.js:13:1
    at fns (node_modules/domready/ready.
    at meteorInstall.node_modules.domready.ready.js (node_modules/domready/ready.js:10:1)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:202:1)
at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
at meteorInstall.node_modules.react-mounter.dist.index.js (node_modules/react-mounter/dist/index.js:21:1)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:202:1)
at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
at meteorInstall.node_modules.react-mounter.index.js (node_modules/react-mounter/index.js:1:1)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:202:1)

Is react-mounter not able to run on the server at this point?

arunoda commented 8 years ago

No that's not possible. This is also the same as #3 We'll work on this soon.

SachaG commented 8 years ago

OK, I wasn't sure if that was the same issue or not. Looking forward for a fix, let me know if you want me to test out anything :)

arunoda commented 8 years ago

Sure. I'll ping you around monday :)