Reactgo: ReferenceError: window is not defined

Created on 29 Oct 2016  路  3Comments  路  Source: reactGo/reactGo

Description

  • Type: Bug

Build to production fails with ReferenceError: window is not defined


Bug

Expected Behavior
Node.js server starts in prod mode after running npm start

Actual Behavior
ReferenceError: window is not defined
Error is referencing compiled file at public/assets/server.js

Steps to Reproduce

npm install

npm run build

npm start

Oddly enough, this was working earlier today just fine, it was when I tried to re-install the repo on another machine that it began to fail. Then trying to re-install it on my original machine it began throwing this error.

Some more error details:

npm ERR! Linux 4.4.23-31.54.amzn1.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `cross-env NODE_ENV=production node compiled/index.js`
npm ERR! Exit status 1

Most helpful comment

I ran into this issue too and tracked the error back to redux-logger. It looks like there's an open PR addressing this.

All 3 comments

I ran into this issue too and tracked the error back to redux-logger. It looks like there's an open PR addressing this.

The PR above has been merged and after running npm update redux-logger on a fresh clone, it's working in my machine.

Looks good! I think it can be closed since that's been resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

choonkending picture choonkending  路  4Comments

ZeroCho picture ZeroCho  路  8Comments

elitekode picture elitekode  路  8Comments

Cleanshooter picture Cleanshooter  路  7Comments

gsccheng picture gsccheng  路  6Comments