Skip to content

Props API doesn't work on deployed sites #214

@wise-king-sullyman

Description

@wise-king-sullyman

NEEDS REFINEMENT

When hitting the /props API for a page on a real deploy we are seeing a 500 error which isn't defined by us.

We do not encounter this when running locally, either in the dev or prod preview servers.

I believe this is because of our usage of node modules in the /props endpoint.

I think we’ve got these options:

  1. we do anything that requires filesystem operations or stuff from node at build time and either
    a. write it to a file that we can fetch from or
    b. prerender it

  2. we can enable node stuff in cloudflare by updating our compatibility date, but this I think still might have some issues with fs operations (the props API is still running into problems) and it will probably increase the cloudflare bundle size, though not too far for us to handle, at least yet

I lean towards option 1, with doing 1b when we can without bloating the bundle noticeably since that’s the kind of pattern we’re mostly following in other places so far, but this isn't a requirement and my opinion could be subject to change based on further investigation of the issue and solutions.


Jira Issue: PF-3602

Metadata

Metadata

Assignees

No one assigned

    Labels

    PF TeambugSomething isn't working

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions