Select to view content in your preferred language

Undefined Error: Does WatchUtils still work with older 4x version?

529
1
11-13-2023 05:39 PM
mbussey
New Contributor

Hello,

I am receiving the following error:

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

I haven't made any code changes or meaningful changes to the webmap this application points to.

I have read that this could be a timing issue and I saw that WatchUtils has been removed from the API, which this app is heavily dependent. I have specified in the package.json for the application to use version 4.23.7, which predates the deprecation of WatchUtils 

I used this in the package.json code for that: "@arcgis/core": "4.23.7"

If I specify this version of the API in this manner will the breaking changes still effect me?

Any info can help, thanks!

 

 

0 Kudos
1 Reply
AndyGup
Esri Regular Contributor

Hi @mbussey, that's correct - if you install 4.23.7, then it will include watchUtils.

0 Kudos