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

TypeError on GH Pages page load #1178

Closed
ryanlovett opened this issue May 1, 2024 · 4 comments
Closed

TypeError on GH Pages page load #1178

ryanlovett opened this issue May 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ryanlovett
Copy link
Contributor

Description

We have a MyST site deployed at https://jupyterhealth.github.io/myst-site-book/ via github actions. I can visit the front page of the site, but if I click on About or Projects in the top navigation, I see the error:

Application Error
TypeError: Cannot read properties of undefined (reading 'frontmatter')
    at E (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-OQ6RQI2G.js:4:1714)
    at Po (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-XJN3BT5Q.js:6:19476)
    at Vu (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-XJN3BT5Q.js:8:3134)
    at mc (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-XJN3BT5Q.js:8:44439)
    at fc (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-XJN3BT5Q.js:8:39465)
    at Rd (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-XJN3BT5Q.js:8:39396)
    at ul (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-XJN3BT5Q.js:8:39256)
    at Zu (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-XJN3BT5Q.js:8:35678)
    at sc (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-XJN3BT5Q.js:8:34634)
    at Il (https://jupyterhealth.github.io/myst-site-book/build/_shared/chunk-XJN3BT5Q.js:1:8284)

If i reload that page, the error goes away. If I click on About while I am looking at /about, I will see the same error.

This is not reproducible running a local server, in part because the repo is not the org's main gh pages site. For example the site nav uses the url /myst-site-book/about which references the path to the repo and to the page within the repo. However this path does not exist when running on localhost. One must manually enter localhost:{port}/about to visit that page. When I do so, I don't see the error.

@ryanlovett ryanlovett added the bug Something isn't working label May 1, 2024
@ryanlovett
Copy link
Contributor Author

I've tried pinning mystmd in GitHub actions to something older (1.1.56, 1.1.55), but the issue is still present.

@rowanc1
Copy link
Member

rowanc1 commented May 9, 2024

Taking a look now.

@rowanc1
Copy link
Member

rowanc1 commented May 9, 2024

We were using an internal pre-fetch link, but that only works on non-static pages! This changes to using the correct type of link. I will deploy a fix shortly and let you know when you can re-deploy!

rowanc1 added a commit to executablebooks/myst-theme that referenced this issue May 9, 2024
@agoose77
Copy link
Collaborator

I think this has been fixed by #378! Please re-open if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants