observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.58k stars 125 forks source link

RuntimeError: Failed to fetch dynamically imported module: https://xxx.observablehq.cloud//_import/components/rangoSemanas.883616f7.js #1671

Closed gcoch closed 1 month ago

gcoch commented 2 months ago

The App the data uploads correctly after manual deploy, but throws this error after the first scheduled deploy. This is happening w/ all the imported files.

gcoch commented 2 months ago

Seems that moving all the imports into the md pages does the trick. I've also added localStorage.clear(); sessionStorage.clear();

mcmcclur commented 2 months ago

I can't help but notice that you've got two slashes in your URL:

cloud//_import

That looks like an error, though, I'm not sure how it was produced.

gcoch commented 2 months ago

Hi Mark, thanks for the comment. Could've been an error when I typed the message here. The imported modules worked well locally but didn't when I deployed the code to the cloud. Since then, I moved the code to each page and it's worked. There's another issue though, which is that automated deploys are not reading the code in github branches, but instead use the master branch.

Side note: I live in Durham - not far from Asheville : - )

mcmcclur commented 2 months ago

I mentioned this because that double slash looks a lot like something that might arise programmatically, particularly since there's no project-name in the URL. Rather than

observablehq.cloud//_import/...

I'd expect

observablehq.cloud/project-name/_import...

It's hard to say without seeing the code but I think that might happen if you generate a link dynamically using an absolute path to pass to the import function. I just opened a similar issue.

mbostock commented 1 month ago

There’s not enough information here for us to investigate further, but we’ve been in touch separately via Observable’s support channels and so hopefully this issue has been addressed. Please contact at us at support@observablehq.com if we can be of further assistance.