Summary
If a notebook have the same name as imported package, it causes “multiple VERSIONs detected” error when importing.
Problem
I wanted to use Deck.gl in my notebook. My notebook title was deck, and I named imported package deck, which caused error like “multiple versions detected: undefined vs …” as shown in the screenshot below. Changing the notebook title and refreshing solved the problem.
When you have an element with an id attribute, it becomes a global variable. Hence, you can refer to the H1 element generated above like so:
deck
This will give you an HTMLHeadingElement.
Deck.gl checks the existence of the deck global to determine if you’ve already loaded the Deck.gl library. This means that any page with an element with the id “deck” will (erroneously) trigger this “multiple versions detected” error.
You can workaround this issue by using HTML instead of Markdown to generate your heading:
html`<h1>deck</h1>`
Deck.gl could also fix their library to have a more precise test for already being loaded, rather than checking the existence of a deck global.