uber / nebula.gl

A suite of 3D-enabled data editing overlays, suitable for deck.gl
https://nebula.gl/
Other
686 stars 166 forks source link

Example setup broken in fresh Vite app #883

Open alexvarney opened 1 year ago

alexvarney commented 1 year ago

Describe the bug

I created a new Vite react-ts project with deck.gl/react and attempted to install Nebula and am receiving the following error:

nebula-layer.ts:2 Uncaught TypeError: Super expression must either be null or a function
    at _inherits (nebula-layer.ts:2:1)
    at nebula-layer.ts:6:22
    at node_modules/nebula.gl/dist-es6/lib/nebula-layer.js (nebula-layer.ts:33:4)
    at __require2 (chunk-TFWDKVI3.js?v=1c1382e0:18:50)
    at node_modules/nebula.gl/dist-es6/index.js (index.ts:7:1)
    at __require2 (chunk-TFWDKVI3.js?v=1c1382e0:18:50)
    at index.ts:30:1

I've attempted downgrading Vite version to 4.0.4, and updating the vite.config.ts and tsconfig.json to match those in the example repos but the error still persists.

When using Parcel instead of Vite Deck.gl loads and the Nebula tools work correctly. Here's a link to a demo repo: https://github.com/alexvarney/nebula-setup-tests

I'm guessing this is probably a Vite bug/config issue and not an issue with Nebula, but perhaps I have missed something obvious?

Actual Result

Expected Result

Reproduce Steps

Screenshots

To Do List

torsol commented 11 months ago

Did you ever find a solution? Experiencing the same error on a fresh install now :)