deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

[Bug] @deck.gl/arcgis fails to resolve "@arcgis/core/views/3d/externalRenderers" in v4.32.5

Open JoostKiens opened this issue 8 months ago • 1 comments

Description

When using @arcgis/core v4.32.5, the @deck.gl/arcgis package fails to resolve the @arcgis/core/views/3d/externalRenderers module, preventing the application from starting.

This issue does not occur with @arcgis/core v4.31.0. The error suggests marking @arcgis/core/views/3d/externalRenderers as external to avoid the issue, but that is not a viable solution.

Error message in terminal

✘ [ERROR] Could not resolve "@arcgis/core/views/3d/externalRenderers"

    node_modules/@deck.gl/arcgis/dist/index.js:11:35:
      11 │ import * as externalRenderers from '@arcgis/core/views/3d/externalRenderers';
         ╵                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@arcgis/core/views/3d/externalRenderers" as external to exclude it from the
  bundle, which will remove this error.

Flavors

  • [ ] Script tag
  • [ ] React
  • [ ] Python/Jupyter notebook
  • [ ] MapboxOverlay
  • [ ] GoogleMapsOverlay
  • [ ] CARTO
  • [x] ArcGIS

Expected Behavior

The @deck.gl/arcgis package should correctly resolve @arcgis/core/views/3d/externalRenderers. The example should run without errors when using npm install with the latest versions of dependencies.

Steps to Reproduce

  1. Clone the official deck.gl ArcGIS example:
git clone --branch v9.1.4 https://github.com/visgl/deck.gl.git
cd deck.gl/examples/get-started/pure-js/arcgis
  1. Install dependencies without specifying versions (to get the latest @arcgis/core v4.32.5):
npm install
  1. Start the development server:
npm start
  1. Observe the issue:
  • The build fails with an error about @arcgis/core/views/3d/externalRenderers not being resolved.
  • Downgrading @arcgis/core to v4.31.0 fixes the issue.
npm install @arcgis/[email protected]
npm start
  • The error about @arcgis/core/views/3d/externalRenderers disappears.
  • However, a different issue occurs: layers do not appear on the map (see previous bug report).

🛠️ Alternatively, use this CodeSandbox to reproduce the issue instantly: Broken Example (latest @arcgis/core v4.32.5)

Environment

  • Framework version: [email protected]
  • ArcGIS version: @arcgis/core v4.32.5 (bug) / @arcgis/core v4.31.0 (working)
  • Browser: 133.0.6943.127
  • OS: MacOS 15.3.1

Logs

Terminal log:

✘ [ERROR] Could not resolve "@arcgis/core/views/3d/externalRenderers"

    node_modules/@deck.gl/arcgis/dist/index.js:11:35:
      11 │ import * as externalRenderers from '@arcgis/core/views/3d/externalRenderers';
         ╵                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@arcgis/core/views/3d/externalRenderers" as external to exclude it from the
  bundle, which will remove this error.

JoostKiens avatar Mar 05 '25 05:03 JoostKiens