Skip to content

fix(nextjs): Remove ai from default server external packages #16736

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

RulaKhaled
Copy link
Member

We have added the 'ai' package to our list of externalized packages for instrumentation purposes. Unfortunately this causes Next.js to incorrectly evaluate the Vercel AI SDK's conditional exports - specifically the react-server export condition isn't properly handled when the package is externalized, resulting in client-side code being loaded in server components instead of the server-side functions.

@RulaKhaled RulaKhaled merged commit 43403dc into develop Jun 25, 2025
54 checks passed
@RulaKhaled RulaKhaled deleted the fix-ai-package-issue branch June 25, 2025 13:39
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.

2 participants