GordonSmith/vscode-ojs

"Failed to fetch" error when importing within .ojsnb after VSCode restart

Opened this issue · 1 comments

Hi,

Absolutely loving this library, overall; thank you -- Observable is amazing, but it's a dealbreaker to not be able to use my local tools, so this fills a real gap.

I'm having a hangup trying to import one file from another .ojsnb file. Everything works as expected when viewing the importing notebook through the preview window (Cmd+K V), but when running the cells in the notebook view, it only works until I close and restart VSCode. After a restart, the importing .ojsnb file simply outputs "Failed to fetch", with the quotes, as the output of the import line when running the cells. (other lines in the cell up to the import line run normally, nothing after.)

The issue is reproducible for me with vscode-ojs/samples/myMain.ojs that imports from ./myLib.ojs, converted to a .ojsnb file. (it also reproduces with a fully simplified version of them.)

Any insight into what's causing this behavior, and how to fix it?

I'd be happy to perform any actions you might request of me, let me know.

Do you have a small example of it not working to get me started? - Just to clarify import is working fine with ojs/omd but not working as expected when used within an ojsnb file? Is it:

  1. ojsnb importing ojs file?
  2. ojsnb importing from ojsnb file?

Or a different combination (thx for the report)?