Open mrasoahaingo opened 6 months ago
Getting the same issue here on plasmo
🔴 ERROR | Build failed. To debug, run plasmo dev --verbose.
🔴 ERROR | Failed to resolve 'ai/rsc' from './src/actions.tsx'
🔴 ERROR | Cannot load file './rsc' from module 'ai'
Running plasmo@0.86.3
, and tried ai
version 3.0.0 to 3.0.2
I was able to work-around the module resolution via jest config update in moduleNameMapper:
moduleNameMapper: { ... '^ai/rsc$': '<rootDir>/node_modules/ai/rsc/dist', }
Description
I tried to implement test using the generated app with
npx create-next-app@latest --example with-jest with-jest-app
Then I use the example here https://sdk.vercel.ai/docs/getting-started/nextjs-app-router
But when I launch
yarn test
I have this error
Thank you for your help
Code example
No response
Additional context
No response
Note: It works with the Vitest version