Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]Using @deck.gl/arcgis@9.0.4: Uncaught TypeError: Class extends value undefined is not a constructor or null #8710

Closed
2 of 7 tasks
gdnwr opened this issue Mar 26, 2024 · 1 comment
Labels

Comments

@gdnwr
Copy link

gdnwr commented Mar 26, 2024

Description

The official ArcGIS example using deck.gl encounters errors after upgrading deck.gl from version 8 to 9.0.4.
Error: Uncaught TypeError: Class extends value undefined is not a constructor or null
https://developers.arcgis.com/javascript/latest/sample-code/custom-lv-deckgl/

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS

Expected Behavior

No response

Steps to Reproduce

https://codesandbox.io/p/sandbox/arcgis-deck-forked-khhksj?file=%2Findex.html%3A9%2C39-9%2C46

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    />
    <title>
      Build a custom layer view using deck.gl | Sample | ArcGIS Maps SDK for
      JavaScript 4.29
    </title>

    <script src="https://unpkg.com/deck.gl@9.0.4/dist.min.js"></script>
    <script src="https://unpkg.com/@deck.gl/geo-layers@9.0.4/dist.min.js"></script>
    <script src="https://unpkg.com/@deck.gl/arcgis@9.0.4/dist.min.js"></script>
    <link
      rel="stylesheet"
      href="https://js.arcgis.com/4.29/esri/themes/light/main.css"
    />
    <script src="https://js.arcgis.com/4.29/"></script>

    <style>
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    </style>

    <script>
      require(["esri/Map", "esri/views/MapView"], (Map, MapView) => {
        deck.loadArcGISModules().then((arcGIS) => {
          const layer = new arcGIS.DeckLayer();

          setInterval(() => {
            layer.deck.layers = [
              new deck.TripsLayer({
                id: "trips",
                data: "https://raw.githubusercontent.com/uber-common/deck.gl-data/master/examples/trips/trips-v7.json",
                getPath: (d) => {
                  return d.path;
                },
                getTimestamps: (d) => {
                  return d.timestamps;
                },
                getColor: (d) => {
                  return d.vendor === 0 ? [253, 128, 93] : [23, 184, 190];
                },
                opacity: 1.0,
                widthMinPixels: 4,
                rounded: true,
                trailLength: 180,
                currentTime: (performance.now() % 20000) / 10,
                shadowEnabled: false,
              }),
            ];
          }, 50);

          const mapView = new MapView({
            container: "viewDiv",
            map: new Map({
              basemap: "dark-gray-vector",
              layers: [layer],
            }),
            center: [-74, 40.72],
            zoom: 14,
          });
        });
      });
    </script>
  </head>

  <body>
    <div id="viewDiv"></div>
  </body>
</html>

Environment

  • Framework version:deck.gl@9.0.3
  • Browser: Chrome 123.0.6312.58
  • OS: Windows11

Logs

Uncaught TypeError: Class extends value undefined is not a constructor or null
at dist.min.js:7:58791
at dist.min.js:26:2961
at webpackUniversalModuleDefinition (dist.min.js:6:23)
at dist.min.js:6:35

Uncaught TypeError: deck.loadArcGISModules is not a function
at ():38:14
at nb (4.29/:23:280)
at 4.29/:24:36
at sb (4.29/:23:406)
at tb (4.29/:23:481)
at Ja (4.29/:25:452)
at HTMLScriptElement. (4.29/:29:273)

@gdnwr gdnwr added the bug label Mar 26, 2024
@gdnwr gdnwr changed the title [Bug]Using @deck.gl/arcgis@9.0.1,error occurs when using the official ArcGIS example. [Bug]Using @deck.gl/arcgis@9.0.3,error occurs when using the official ArcGIS example. Apr 1, 2024
@gdnwr gdnwr changed the title [Bug]Using @deck.gl/arcgis@9.0.3,error occurs when using the official ArcGIS example. [Bug]Using @deck.gl/arcgis@9.0.3: Uncaught TypeError: Class extends value undefined is not a constructor or null Apr 1, 2024
@gdnwr gdnwr changed the title [Bug]Using @deck.gl/arcgis@9.0.3: Uncaught TypeError: Class extends value undefined is not a constructor or null [Bug]Using @deck.gl/arcgis@9.0.4: Uncaught TypeError: Class extends value undefined is not a constructor or null Apr 3, 2024
@Pessimistress
Copy link
Collaborator

Fixed in 9.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants