I am developing a Web app that uses Leaflet. It works well locally and did not give me any error. I deployed successfully on Render, but when I ran it, it gave this error:
Uncaught TypeError: Cannot read properties of undefined (reading ‘__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED’) at react-dom-3ae15c20.js:9:5345
Typically this sort of error pops up because the service is using an incompatible version of Node. Did you explicitly specify which version of Node you need during the build/deploy process, or as an environment variable?
Hopefully that will resolve the problem, as Render’s current default is v14.17.0. The Render service will fall back on our default unless you explicitly tell it to use a different version.
Gotcha. As a next step, have you done any online research on this error? A brief search I did brought up a few possible causes, one being that React is not getting installed during the build process. Are you running npm install in the build command?
Hi Mike,
I think that something to do with the web pack config in vite that it’s broken for the project. To fix it, I created a new vite project, installed the dependencies first, copied the files into the src folder and deployed the project again. It worked.
Thanks,
Alejandro