🏠 back to Observable

issue requiring nebula.gl

Hi, I’m having an issue requiring the library nebula.gl in the notebook

I tried following the require example using the https://observablehq.com/@observablehq/module-require-debugger notebook but the output is undefined.

nebula = require('nebula.gl@0.19.2/dist/index.js').catch(() => window["_style"])

nebula = undefined

I want to use nebula.gl to select a polygon region from a deck.gl visualization - see example https://codesandbox.io/s/deckgl-and-nebulagl-editablegeojsonlayer-no-react-forked-7fcst?file=/app.js

Sometimes you can use bundle.run to get a version that works in browsers, but it seems to return an error:

require('https://bundle.run/@nebula.gl/layers@0.21.1')

gives

Error: deck.gl - multiple versions detected: 8.0.17 vs 8.3.7

1 Like

Thanks @severo, I edited the notebook somewhat to have a single deck import but now I’m seeing the similar error

deck = Error: luma.gl - multiple VERSIONs detected: 8.3.1 vs 8.2.0

I was able to import nebula.gl by switching my deck.gl version to 8.3.7

Thanks @severo.

However, I’m now running to an issue getting the nebula layer to work with deck.gl, but I’ll raise this issue elsewhere.

1 Like