External javascript for dataviewjs doesn't work

What I’m trying to do

Run javascript for dataviewjs in external js file.

Things I have tried

I have this in my note in a dataviewjs block:

  await dv.view("javascript/dataview", dv.current());

In my vault I have a folder javascript containing the file dataview.js.
I also tried to put this in the snippet folder, but nothing works, I keep on getting this error:

image

What goes wrong here?

Just to make sure: The file is created outside of Obsidian, and is named dataview.js, and not dataview.js.md ?

It was indeed something like that :flushed:, it was a .txt file still, thanks it is solved now. I knew it had to be something stupid.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.