Uncaught TypeError, react-dom-3ae15c20.js

Hi there,

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

Does somebody know what is causing this error?

Thanks,

Alejandro

Hi there,

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?

Regards,
Mike


Render Support Engineer, MT (UTC-7)

Hi Mike,
I didn’t specify the nodejs version. I am going to specify the version. I use node v18.17.1.
Thanks,
Alejandro

Hi there,

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.

Regards,
Mike


Render Support Engineer, MT (UTC-7)

Hi Mike,

I tried the three options, one each time, but none of them resolved the problem.

option 1
NODE_VERSION: 18.17.1

option 2
.node-version file with the node version line

option 3
“engines”: {
“node”: “>=18.17.0 <19.0”
}

Thanks,
Alejandro

Hi there,

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?

A couple links I found that discuss the error:

Hope that helps!

Regards,
Mike


Render Support Engineer, MT (UTC-7)

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

So glad you were able to get the problem resolved! Thanks for sharing what worked.

Regards,
Mike


Render Support Engineer, MT (UTC-7)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.