You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yarn test
FAIL app/page.test.tsx
● Test suite failed to run
Cannot find module 'ai/rsc' from 'app/page.tsx'
Require stack:
app/page.tsx
app/page.test.tsx
12 | return (
13 | <div className="flex flex-col w-full max-w-md py-24 mx-auto stretch">
> 14 | {data && <pre>{JSON.stringify(data, null, 2)}</pre>}
| ^
15 | {messages.map((m, i) => (
16 | <div key={i} className="whitespace-pre-wrap">
17 | {m.role === 'user' ? 'User: ' : 'AI: '}
at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:427:11)
at Object.<anonymous> (app/page.tsx:14:14)
at Object.<anonymous> (app/page.test.tsx:9:54)
(node:3728) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.473 s
Ran all test suites related to changed files.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press p to filter by a filename regex pattern.
› Press t to filter by a test name regex pattern.
› Press q to quit watch mode.
› Press Enter to trigger a test run.
✨ Done in 191.55s.
Thank you for your help
Code example
No response
Additional context
No response
Note: It works with the Vitest version
The text was updated successfully, but these errors were encountered:
🔴 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
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
The text was updated successfully, but these errors were encountered: