Select to view content in your preferred language

@arcgis/core 4.21.2 error

513
2
10-14-2021 08:13 AM
RonnieKim
New Contributor

Hi I am new to ESRI and the community, I am following the tutorial and trying to load a base-map (below example with @arcgis/core 4.21.2, linking the css directly from index.html), however, I am getting below error, anyone has an idea what went wrong or how to fix?  

Cannot read properties of undefined (reading 'cssVarShim')


 

 

import Map from "@arcgis/core/Map";
import MapView from "@arcgis/core/views/MapView";

const map = new Map({
basemap: "dark-gray"
});

const view = new MapView({
container: "viewDiv",
map: map,
zoom: 4,
center: [-100, 40]
});

 

 

 

0 Kudos
2 Replies
ReneRubalcava
Honored Contributor

Can you provide a sample app showing this issue? Not reproducible with the information given.

0 Kudos
RonnieKim
New Contributor

Thanks Rene, I switched to linking the CDN link directly and it seems ok, but I have another question, how do you determine when to use GraphicsLayers or GeoJsonLayer?
with 4.21.2 I ran into error like GraphicsLayers is not a constructor error

0 Kudos