TypeError: Cannot read properties of undefined (reading 'spatialReference')

1724
2
07-05-2022 11:39 AM
ManiAllie
New Contributor

I'm receiving this error when opening up my web app:

TypeError: Cannot read properties of undefined (reading 'spatialReference')

This error is stemming from the source init.js file 'https://js.arcgis.com/3.29/init.js'

and the console errors when calling the '_createWebMap' function. Has anybody come across this recently?

0 Kudos
2 Replies
TimDietz
Occasional Contributor

The message is telling you that the object that you are using to get spacialReference is undefined.  Check your browser debugger.  You should see this error there and should be able to break on the line of code where it occurs.  If you are still having issues, add some console messages (if you can) and paste the output here.

0 Kudos
KenBuja
MVP Esteemed Contributor

One thing to check is whether the order of the require modules and the function arguments are in agreement. Can you post your code?

0 Kudos