rinocloud / react-view-engine

React.js view engine for express.js - client and serverside
https://github.com/rinocloud/react-view-engine
MIT License
12 stars 1 forks source link

ReferenceError: window is not defined #1

Open stevenalanstark opened 9 years ago

stevenalanstark commented 9 years ago

Could you help me figure out my issue? When I try and render my view, which is actually the error view, I am getting the error "window is not defined", but I am using your example view.

here is the error:

ReferenceError: window is not defined
   at Object.<anonymous> (client\views\error.js:25:3)
   at Module._compile (module.js:456:26)
   at Object.require.extensions.(anonymous function) [as .js] (node_modules\node-jsx\index.js:26:12)
   at Module.load (module.js:356:32)
   at Function.Module._load (module.js:312:12)
   at Module.require (module.js:364:17)
   at require (module.js:380:17)
   at View.module.exports.loader.engine (node_modules\react-view-engine\index.js:20:22)
   at View.render (node_modules\express\lib\view.js:93:8)
   at EventEmitter.app.render (node_modules\express\lib\application.js:566:10)

I am new to react, and this is a new project setup, I very well may of done something wrong, so any insight is appreciated.

stevenalanstark commented 9 years ago

RESOLVED

I had react 0.13.1 installed, and this requires 0.12