Skip to content
Discussion options

You must be logged in to vote

I usually refrain from debugging JavaScript issues unrelated to anywidget itself. However, being a fan of deck.gl, I let my curiosity get the best of me.

Your problem seems to be importing deck.gl as a valid ESM via esm.sh. For whatever reason, deck.gl isn't packaged correctly to work with esm.sh out of the box. However, there are ways to parameterize esm.sh to control what is sent to the browser. I recommend familiarizing yourself with their docs if you plan to use this CDN.

I was able to resolve this issue by adding ?bundle to have esm.sh pre-bundle all dependencies into a single JS file on the server (rather than relying in native imports).

import anywidget
import traitlets

class Deck…

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by manzt
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #191 on September 17, 2023 16:46.