x You're importing a component that needs "next/root-params". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-
x You're importing a component that needs "next/root-params". That only works in a Server Component but one of its parents is marked with "use client", so it's a Client Component.
x You're importing a component that needs "server-only". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your-
x You're importing a component that needs "server-only". That only works in a Server Component but one of its parents is marked with "use client", so it's a Client Component.
You're using the "use server" directive in the pages/ directory. That only works in the app/ directory (App Router). Read more: https://nextjs.org/docs/app/building-your-application/rendering/server-components
Error: x You're using the "use server" directive in the pages/ directory. That only works in the app/ directory (App Router). Read more: https://nextjs.org/docs/app/building-your-application/rendering/server-components
,-[1:1]
1 | 'use server'
: ^^^^^^^^^^^^
2 |
3 | export default function Comp() {
4 | return <p>hello world</p>
\`----
Import trace for requested module:
./components/Comp.js
./pages/index.js"
`)
}
})
describe("importing 'next/cache' APIs in pages",()=>{
describe("importing 'next/cache' APIs in pages",()=>{