Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remotion: Handle being imported in a React Server Component #4131

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

JonnyBurger
Copy link
Member

Next.js might throw an esoteric error when importing Remotion Player in a React Server Component:

TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_0__.createContext) is not a function
    at __webpack_require__ (C:\Users\Yuvraj\Desktop\saas\.next\server\webpack-runtime.js:33:42)
    at eval (./components/VideoPlayer.tsx:7:66)
    at (rsc)/./components/VideoPlayer.tsx (C:\Users\Yuvraj\Desktop\saas\.next\server\app\page.js:239:1)
    at __webpack_require__ (C:\Users\Yuvraj\Desktop\saas\.next\server\webpack-runtime.js:33:42)

Improving the DX and suggesting to add "use client" to the top

Copy link

vercel bot commented Jul 29, 2024

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 Jul 29, 2024 11:18am
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 11:18am

@JonnyBurger JonnyBurger merged commit 0fa7e88 into main Jul 29, 2024
13 checks passed
@JonnyBurger JonnyBurger deleted the deny-rsc-export branch July 29, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant