This report details a SyntaxError related to the picocolors module when running an Astro project with its latest dependencies.
Run the following commands in order:
npm i
npm run db:push
npm run devAfter 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)
- This bug reproduction uses the latest versions of all dependencies at the time of reporting.
- The issue is not caused by StudioCMS.
Downgrading to specific package versions resolves the error. Follow these steps for a clean downgrade:
-
Edit
package.jsonUpdate 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" } } -
Clear Old Packages Delete your
node_modulesfolder and yourpackage-lock.jsonfile. This step is crucial to ensure npm fetches the correct downgraded packages and builds a new, valid dependency tree. -
Re-install Dependencies Run a clean installation:
npm i