Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Korolen opened this issue May 28, 2023 · 1 comment

Comments

@Korolen
Copy link

Korolen commented May 28, 2023

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.

@GordonSmith
Copy link
Owner

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants