I have a Heroku test environment with a Ruby on Rails backend and React front-end. Recently, I pushed out some changes to the test environment and am now getting a blank screen with one of two errors. Either:
<body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/static/js/main.d825ec61.js"></script></body>
or:
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at redux.js:523:1
at o (redux.js:87:1)
at Object.<anonymous> (store.js:14:15)
at t (bootstrap 145a692a3e0162c12867:19:1)
at Object.<anonymous> (main.d825ec61.js:30447:65)
at t (bootstrap 145a692a3e0162c12867:19:1)
at Object.<anonymous> (main.d825ec61.js:29463:18)
at t (bootstrap 145a692a3e0162c12867:19:1)
at bootstrap 145a692a3e0162c12867:62:1
at bootstrap 145a692a3e0162c12867:62:1
depending upon who is trying to open the app.
Here is a link to the test site on Heroku: https://alutiiq-lang-test.herokuapp.com/ Please note that it is a free dyno, so takes a minute to load (if it loads for you!), and here is the repo I am working in https://github.com/migobach/alutiiqLang.
When I do roll back to a previous version, it works fine, but I cannot figure out what the difference is aside from on package that I added: "react-contenteditable": "^3.3.5", which I need for admin privileges.
My Heroku logs have no errors that should prevent rendering, and the build is successful, however, nothing renders.
The solution ended up being related to Redux. After purging all caches, and testing locally in an incognito window, I was able to see the error in greater detail which helped me ask better questions and lead me to this solution. After commenting out this line from my code:
window.__REDUX_DEVTOOLS_EXTENSION__&& window.__REDUX_DEVTOOLS_EXTENSION__()
I was able run locally with no issue, and then push to Heroku successfully.