I'm trying to set up a simple template using codesandbox to be able to spin up arcgis js api maps quickly. I dont like codepen as much as codesandbox. I'd like to do it with the newer es6 module imports. I added @Anonymous User/core to the dependencies, and in my js file I have this:
import Map from "@arcgis/core/Map";
import MapView from "@arcgis/core/views/MapView";
import "@arcgis/core/assets/esri/themes/dark/main.css";
const map = new Map({
basemap: "dark-grey"
});
const view = new MapView({
map,
container: "viewDiv",
zoom: 4,
center: [15, 65]
});
Unfortunately I'm getting the error:
Cannot read property 'zoomIn' of null
I tried using the `ncp` script under the
copy assets section of the docs , but that makes no difference. If you close the error overlay, you can see that the map container does seem to render, but no map is in there.
What simple thing am I missing here?