I am using node v17.4.0 and trying to make a very simple web app. This is the tree structure and I have installed @arcgis/core according to https://developers.arcgis.com/javascript/latest/es-modules/
The map does not load at all, and I get an error:
Uncaught TypeError: Error resolving module specifier “luxon”. Relative module specifiers must start with “./”, “../” or “/”. languageUtils.js:5:508
├── frontend
│ ├── index.html
│ ├── js
│ │ ├── app.js
│ └── node
│ ├── node_modules
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<!-- SCRIPTS SECTION START -->
<!-- ArcGIS -->
<script src="https://js.arcgis.com/4.22/"></script>
<!-- Local Scripts -->
<script src="js/app.js" type="module"></script>
<!-- SCRIPTS SECTION END -->
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
import Map from "../node/node_modules/@arcgis/core/Map.js";
import MapView from "../node/node_modules/@arcgis/core/views/MapView.js";
const map = new Map();
const view = new MapView({
container: "viewDiv",
map: map,
});
Extremely frustrating trying to move away from AMD to ESM and it doesn't even work out of the box.