remotion-dev / remotion

🎥 Make videos programmatically with React
https://remotion.dev
Other
20.87k stars 1.05k forks source link

fix cjs export of google fonts #4444

Closed Calvein closed 3 weeks ago

Calvein commented 3 weeks ago

I'm requiring a google font package from node in common js and I get this error:

Error: Cannot find module '/blabla/node_modules/@remotion/google-fonts/dist/cjs/WorkSans.cjs'

It's because the cjs files don't exist and are .js instead.

A quick look into the repo shows that it's the only place where we have this issue https://github.com/search?q=repo%3Aremotion-dev%2Fremotion%20%22*.cjs%22&type=code

I hope that's the correct fix because I know how much publishing for ESM/CJS is a nightmare 😱

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bugs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 8:48am
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 8:48am
1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **remotion-convert** | ⬜️ Skipped ([Inspect](https://vercel.com/remotion/remotion-convert/7uFu6M8SiX8pUYc1mmywUk6NYyoH)) | | | Oct 31, 2024 8:48am |
JonnyBurger commented 3 weeks ago

Oh, thanks for catching that!