Skip to content

faisalagood/studio-cms-onboarding-bug

Repository files navigation

PicoColors Module Import Bug

This report details a SyntaxError related to the picocolors module when running an Astro project with its latest dependencies.


Steps to Reproduce

Run the following commands in order:

npm i
npm run db:push
npm run dev

Observed Error

After starting the development server, the browser console displays the following error:

Uncaught SyntaxError: The requested module '/node_modules/picocolors/picocolors.browser.js?v=482672c8' does not provide an export named 'default' (at endpoint.js?v=482672c8:1:8)


Additional Context

  • This bug reproduction uses the latest versions of all dependencies at the time of reporting.
  • The issue is not caused by StudioCMS.

Workaround

Downgrading to specific package versions resolves the error. Follow these steps for a clean downgrade:

  1. Edit package.json Update the following dependencies to these exact versions. It is important to remove the ^ prefix to lock the versions.

    {
      "dependencies": {
        "@astrojs/db": "0.18.1",
        "@astrojs/node": "9.4.0",
        "astro": "5.14.1"
      }
    }
  2. Clear Old Packages Delete your node_modules folder and your package-lock.json file. This step is crucial to ensure npm fetches the correct downgraded packages and builds a new, valid dependency tree.

  3. Re-install Dependencies Run a clean installation:

    npm i

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •