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

sometimes the notebook displays a "Invalid module" error, that spontaneusly goes away when reloading the page #21

Closed
larsen opened this issue Feb 9, 2024 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@larsen
Copy link
Owner

larsen commented Feb 9, 2024

No description provided.

@larsen larsen added the bug Something isn't working label Feb 9, 2024
@larsen larsen mentioned this issue Feb 4, 2024
6 tasks
@larsen larsen self-assigned this Feb 11, 2024
@larsen larsen added this to the 0.1 milestone Feb 14, 2024
@larsen
Copy link
Owner Author

larsen commented Feb 27, 2024

The only occurrence of the string Invalid module in the scripts loaded in a notebook page is viewer.js,
loaded from this URL: https://storage.clerk.garden/nextjournal/clerk-assets@3mwzShgnuyfhgFN9ahRYKqV32K11/viewer.js?immutable=true

                    kb.onload = ()=>{
                        try {
                            ec(ea.pop()(Ab(Sb)))
                        } catch (Bc) {
                            wc(new Sa("invalid module"))
                        }
                        kb.remove()
                    }

which I believe is the result of merging and minifying several source files.
Looking at the code and the context of the error, I believe this is coming from d3-require, where I can see this snippet

      script.onload = () => {
        try { resolve(queue.pop()(requireRelative(url))); }
        catch (error) { reject(new RequireError("invalid module")); }
        script.remove();
      };

that seems analogous.

@larsen larsen added the help wanted Extra attention is needed label Feb 27, 2024
@larsen
Copy link
Owner Author

larsen commented Mar 1, 2024

What module is causing the problem?


A strategy of last resort could be to remove leaflet-gpx entirely, and use a polyline manually to display the track (look for example https://github.com/jovandeginste/workout-tracker/blob/d97718294191e581bb761172b059a8d728127d69/assets/map.js#L21)

@larsen
Copy link
Owner Author

larsen commented Mar 4, 2024

Tentatively closing this issue.
Let's see if #44 solves or mitigates the problem

@larsen larsen closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant