datasette / datasette-plot

A Datasette plugin for making data visualizations with Observable Plot
https://datasette.io/plugins/datasette-plot
Apache License 2.0
19 stars 0 forks source link

JS Error #7

Open gavinwahl opened 2 months ago

gavinwahl commented 2 months ago

The plot button does not show up and I get this error in the console:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertAdjacentElement')
    at Module.E9 (main.min.js:1:300215)

datasette, version 1.0a16 datasette-plot, version 0.1.0

Downgrading datasette to version 1.0a15 does work.

sachinggsingh commented 2 months ago

The error you're seeing suggests that the insertAdjacentElement function is trying to operate on a null value, likely due to the DOM element not being found. This often happens when trying to manipulate an element that doesn't exist or hasn't yet been rendered in the DOM when the JavaScript code runs.

Since downgrading datasette from version 1.0a16 to 1.0a15 fixes the issue, it indicates that the problem might stem from an incompatibility between datasette-plot version 0.1.0 and datasette version 1.0a16.

1) Update the datasette-plot or datasette 2) Debug the DOM issue

by this hoping your issue should be solved