Repo: https://github.com/jerzy-jarczynski/backend_rest_api_app
I'm trying to deploy an Express.js and React application on Replit. The application is working fine on localhost, and I can also see it using the following link: https://backendrestapiapp.jerzy-jarczynski.repl.co/
However, when I open it in an incognito tab or on other devices, I encounter the following error:
redux.js:621 Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at redux.js:621:18
at e (redux.js:154:12)
at store.js:14:15
at index.js:20:51
at index.js:20:51
Instead of displaying the application, I see a blank screen.
I tried changing the Node.js version in the .replit file using the following configuration:
run = "nvm install 16.18.0 && nvm use 16.18.0 && node server.js"
I also attempted to install the Redux libraries with the --legacy-peer-deps
flag:
npm install redux react-redux --legacy-peer-deps
On Replit, the Node.js version is higher:
~/backendrestapiapp$ node -v
v18.12.1
So, I tested this version locally, but I didn't encounter the same Redux error.