Skip to content

React is undefined in LikeC4 GitHub Actions static build #65

@anehm

Description

@anehm

Problem

When deploying the static site using the LikeC4 GitHub Action, the generated page does not render and Mantine throws the following error in the browser console:

Uncaught TypeError: Cannot read properties of undefined (reading 'useLayoutEffect')
    at mantine-CGtabJk8.js:1:8753

This error occurs because the React object is undefined at runtime. The build output includes Mantine and other JS assets, but React is missing or not properly bundled, causing the site to remain blank.

Steps to Reproduce

  1. Deploy static site with current workflow using likec4/actions@v1.
  2. Open the deployed GitHub Pages site.
  3. Inspect browser console; see the error above.
  4. Confirm that assets are present and downloadable, but window.React is undefined.

Expected Behavior

The static site should render correctly, and all JS dependencies (including React) should be properly bundled and available at runtime.

Actual Behavior

  • Page is blank after deployment.
  • Mantine JS throws error due to missing React.
  • All assets are present and downloadable.

Additional Info

  • The build and deployment workflow uses likec4/actions@v1.
  • The error appears even though assets are uploaded and accessible via GitHub Pages.
  • The issue occurs because React is not bundled or loaded as required by Mantine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions