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

prerender configuration for SSR pages not generating output HTML #986

Closed
1 of 5 tasks
thescientist13 opened this issue Oct 21, 2022 · 0 comments · Fixed by #987
Closed
1 of 5 tasks

prerender configuration for SSR pages not generating output HTML #986

thescientist13 opened this issue Oct 21, 2022 · 0 comments · Fixed by #987
Assignees
Labels
bug Something isn't working CLI P0 Critical issue that should get addressed ASAP SSR v0.26.2
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

I noticed that when viewing my built site on Netlify, I was getting a 404 page!
https://deploy-preview-49--laughing-kare-be3077.netlify.app
Screen Shot 2022-10-21 at 8 54 20 AM

Any WC for src/pages/index.js will do

import fetch from 'node-fetch';
import '../components/upcoming-events/upcoming-events.js';

export default class Home extends HTMLElement {
  async connectedCallback() {
    const events = (await fetch('https://.../api/events').then(resp => resp.json()))

    this.innerHTML = `
      <tt-upcoming-events
        events='${JSON.stringify(events).replace(/'/g, '\\"')}'
      ></tt-upcoming-events>
    `;
  }
}

deploy-63514e686abc6800082c9f5c.zip

Details

Looking into it, I noticed that there indeed was no index.html in the public folder. 😱

 % ls -l public 
total 120
-rw-r--r--  1 analogstudios  staff   7977 Oct 20 14:57 404.html
drwxr-xr-x  5 analogstudios  staff    160 Oct 20 14:47 assets
-rw-r--r--  1 analogstudios  staff  15086 Oct 20 14:57 favicon.ico
-rw-r--r--  1 analogstudios  staff    307 Oct 20 14:57 graph.json
drwxr-xr-x  2 analogstudios  staff     64 Oct 20 14:57 styles

FWIW, I noticed that greenwood serve kind of was working, likely because of #946 . That was definitely a very confusing false positive, especially when dealing with SSR routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI P0 Critical issue that should get addressed ASAP SSR v0.26.2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant