Search code examples
herokureduxmernredux-devtools-extension

Heroku: site not showing


I have a website on Heroku that works normally when accessing from my computer, but when from another PC or any other device, it only shows a blank page.

Tried running heroku logs -t but it doesn't show any issues. Can someone please help?


Solution

  • Sorry for my poorly explained question, but I found the solution to this issue. Since I'm working with the MERN Stack on this project, I was using the Redux DevTools Chrome Extension on both Opera and Chrome, and I was testing my site only on those browsers. When accessing from other browsers or devices that didn't have that extension, the site wouldn't load.

    It happened because I was passing undefined (from browsers that didn't have the extension) to compose on my store.js, so I just had to comment that line:

    const store = createStore(
      rootReducer,
      initialState,
      compose(
        applyMiddleware(...middleware)
        // window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
        // commented the line above and it loaded normally
      )
    );
    

    I only use this extension for development, so there's no reason for deploying the final app with it. Hope this helps anyone who got this error :D