Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG v6.6.0 window is no defined in nodejs environment #376

Closed
sethomas opened this issue Nov 18, 2019 · 7 comments
Closed

BUG v6.6.0 window is no defined in nodejs environment #376

sethomas opened this issue Nov 18, 2019 · 7 comments

Comments

@sethomas
Copy link

Upon a new deploy to heroku, I am getting the below error for my nodejs app utilizing connected-react-router

2019-11-18T03:09:55.179726+00:00 app[web.1]: ReferenceError: window is not defined
2019-11-18T03:09:55.179728+00:00 app[web.1]: at injectQuery (/app/node_modules/connected-react-router/lib/reducer.js:31:40)
2019-11-18T03:09:55.179730+00:00 app[web.1]: at createRouterReducer (/app/node_modules/connected-react-router/lib/reducer.js:64:17)

package.json has this:

"connected-react-router": "^6.3.2",

Resolution I did was just remove the ^ and good to go.

@sethomas
Copy link
Author

node_modules/connected-react-router/lib/reducer.js:31
  var searchQuery = location.search || window.location.search;
                                       ^

ReferenceError: window is not defined
    at injectQuery 

this is on connected-react-router@6.6.0

@sethomas sethomas changed the title window is no defined in nodejs environment BUG v6.6.0 window is no defined in nodejs environment Nov 18, 2019
@sethomas
Copy link
Author

this is not a problem with v6.5.2

@fiendfiend
Copy link

experiencing same issue after upgrading

@zdila
Copy link

zdila commented Nov 18, 2019

Same for me, downgrading to 6.5.2.

@VadimKorobka
Copy link
Contributor

#377

@ivan-aksamentov
Copy link

yarn add supasate/connected-react-router#pull/377/head

For those who live on the edge ;)

@supasate
Copy link
Owner

Fixed in v6.6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants