AI SDK
  • Docs
  • Cookbook
  • Providers
  • Playground
  • AI GatewayGateway

Viewing AI SDK 5 Documentation

Learn more
AI SDK by Vercel
AI SDK 5 Beta
Foundations
Overview
Providers and Models
Prompts
Tools
Streaming
Agents
Getting Started
Navigating the Library
Next.js App Router
Next.js Pages Router
Svelte
Vue.js (Nuxt)
Node.js
Expo
AI SDK Core
Overview
Generating Text
Generating Structured Data
Tool Calling
Prompt Engineering
Settings
Embeddings
Image Generation
Transcription
Speech
Language Model Middleware
Provider & Model Management
Error Handling
Testing
Telemetry
AI SDK UI
Overview
Chatbot
Chatbot Message Persistence
Chatbot Tool Usage
Generative User Interfaces
Completion
Object Generation
Streaming Custom Data
Error Handling
Transport
Reading UIMessage Streams
Message Metadata
Stream Protocols
AI SDK RSC
Advanced
Reference
AI SDK Core
AI SDK UI
AI SDK RSC
Stream Helpers
AI SDK Errors
Migration Guides
Troubleshooting
Azure OpenAI Slow to Stream
Client-Side Function Calls Not Invoked
Server Actions in Client Components
useChat/useCompletion stream output contains 0:... instead of text
Streamable UI Errors
Tool Invocation Missing Result Error
Streaming Not Working When Deployed
Streaming Not Working When Proxied
Getting Timeouts When Deploying on Vercel
Unclosed Streams
useChat Failed to Parse Stream
Server Action Plain Objects Error
useChat No Response
Custom headers, body, and credentials not working with useChat
useChat "An error occurred"
Repeated assistant messages in useChat
onFinish not called when stream is aborted
streamText fails silently
Streaming Status Shows But No Text Appears
Model is not assignable to type "LanguageModelV1"
TypeScript error "Cannot find namespace 'JSX'"
React error "Maximum update depth exceeded"
Jest: cannot find module '@ai-sdk/rsc'
AI SDK CLI
Authentication
TroubleshootingJest: cannot find module '@ai-sdk/rsc'

Jest: cannot find module '@ai-sdk/rsc'

Issue

I am using AI SDK RSC and am writing tests for my RSC components with Jest.

I am getting the following error: Cannot find module '@ai-sdk/rsc'.

Solution

Configure the module resolution via jest config update in moduleNameMapper:

jest.config.js
"moduleNameMapper": {
"^@ai-sdk/rsc$": "<rootDir>/node_modules/@ai-sdk/rsc/dist"
}
Previous
React error "Maximum update depth exceeded"
Next
AI SDK CLI
On this page
Jest: cannot find module '@ai-sdk/rsc'
Issue
Solution
Elevate your AI applications with Vercel.
Trusted by OpenAI, Replicate, Suno, Pinecone, and more.
Vercel provides tools and infrastructure to deploy AI apps and features at scale.

Resources

DocsCookbookProvidersShowcaseGitHubDiscussions

More

PlaygroundContact Sales

About Vercel

Next.js + VercelOpen Source SoftwareGitHubX

Legal

Privacy Policy

© 2025 Vercel, Inc.