You're importing a component that imports client-only. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
> 1 | import 'client-only'
> 1 | import 'client-only'
| ^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^
2 |
2 |
3 | export default function ClientOnlyLib() {
3 | export default function ClientOnlyLib() {
4 | return 'client-only-lib'
4 | return 'client-only-lib'
You're importing a component that imports client-only. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
You're importing a component that needs "next/headers". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your-application/rendering/server-components
> 1 | import { cookies } from 'next/headers'
> 1 | import { cookies } from 'next/headers'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
2 |
3 | export default function Page() {
3 | export default function Page() {
4 | return <p>hello world</p>
4 | return <p>hello world</p>
You're importing a component that needs "next/headers". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your-application/rendering/server-components
Import traces:
Import traces:
Browser:
Browser:
./components/Comp.js
./components/Comp.js
...
@@ -138,15 +136,13 @@ describe('Error Overlay for server components compiler errors in pages', () => {
...
@@ -138,15 +136,13 @@ describe('Error Overlay for server components compiler errors in pages', () => {
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-application/rendering/server-components
> 1 | import 'server-only'
> 1 | import 'server-only'
| ^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^
2 |
2 |
3 | export default function Page() {
3 | export default function Page() {
4 | return 'hello world'
4 | return 'hello world'
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-application/rendering/server-components
Import traces:
Import traces:
Browser:
Browser:
./components/Comp.js
./components/Comp.js
...
@@ -223,15 +219,13 @@ describe('Error Overlay for server components compiler errors in pages', () => {
...
@@ -223,15 +219,13 @@ describe('Error Overlay for server components compiler errors in pages', () => {
You're importing a component that needs "after". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your-application/rendering/server-components
> 1 | import { after } from 'next/server'
> 1 | import { after } from 'next/server'
| ^^^^^
| ^^^^^
2 |
2 |
3 | export default function Page() {
3 | export default function Page() {
4 | return 'hello world'
4 | return 'hello world'
You're importing a component that needs "after". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your-application/rendering/server-components
Import traces:
Import traces:
Browser:
Browser:
./components/Comp.js
./components/Comp.js
...
@@ -317,15 +311,13 @@ describe('Error Overlay for server components compiler errors in pages', () => {
...
@@ -317,15 +311,13 @@ describe('Error Overlay for server components compiler errors in pages', () => {
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-your-application/rendering/server-components
> 1 | import { foo } from 'next/root-params'
> 1 | import { foo } from 'next/root-params'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 |
2 |
3 | export default function Page() {
3 | export default function Page() {
4 | return 'hello world'
4 | return 'hello world'
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-your-application/rendering/server-components
@@ -177,13 +177,13 @@ describe('react-dom/server in React Server environment', () => {
...
@@ -177,13 +177,13 @@ describe('react-dom/server in React Server environment', () => {
)
)
if(isTurbopack){
if(isTurbopack){
awaitexpect(browser).toDisplayRedbox(`
awaitexpect({browser,next}).toDisplayRedbox(`
{
{
"description": "Ecmascript file had an error",
"description": "You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.",
You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
> 3 | import ReactDOMServerEdgeDefault from 'react-dom/server'
> 3 | import ReactDOMServerEdgeDefault from 'react-dom/server'
> 1 | import * as ReactDOMServerNode from 'react-dom/server.node'
| ^
2 | // Fine to drop once React is on ESM
3 | import ReactDOMServerNodeDefault from 'react-dom/server.node'
4 |",
}
}
`)
`)
}
}
...
@@ -322,9 +316,9 @@ describe('react-dom/server in React Server environment', () => {
...
@@ -322,9 +316,9 @@ describe('react-dom/server in React Server environment', () => {
if(isTurbopack){
if(isTurbopack){
expect(redbox).toMatchInlineSnapshot(`
expect(redbox).toMatchInlineSnapshot(`
{
{
"description": "Ecmascript file had an error",
"description": "You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.",
You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
1 | import * as ReactDOMServerNode from 'react-dom/server'
1 | import * as ReactDOMServerNode from 'react-dom/server'
2 | // Fine to drop once React is on ESM
2 | // Fine to drop once React is on ESM
> 3 | import ReactDOMServerNodeDefault from 'react-dom/server'
> 3 | import ReactDOMServerNodeDefault from 'react-dom/server'
...
@@ -333,7 +327,6 @@ describe('react-dom/server in React Server environment', () => {
...
@@ -333,7 +327,6 @@ describe('react-dom/server in React Server environment', () => {
5 | export const runtime = 'nodejs'
5 | export const runtime = 'nodejs'
6 |
6 |
You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
You have an unresolved @next/codemod comment "remove jsx of next line" that needs review.
1 | export default function Page() {
1 | export default function Page() {
> 2 | // @next-codemod-error remove jsx of next line
> 2 | // @next-codemod-error remove jsx of next line
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 | return <p>hello world</p>
3 | return <p>hello world</p>
4 | }
4 | }
5 |
5 |
You have an unresolved @next/codemod comment "remove jsx of next line" that needs review.
After review, either remove the comment if you made the necessary changes or replace "@next-codemod-error" with "@next-codemod-ignore" to bypass the build error if no action at this line can be taken."
After review, either remove the comment if you made the necessary changes or replace "@next-codemod-error" with "@next-codemod-ignore" to bypass the build error if no action at this line can be taken."
error - [analysis] /turbopack/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/input/index.js:3:16 Ecmascript file had an error
error - [analysis] /turbopack/crates/turbopack-tests/tests/snapshot/imports/duplicate-binding/input/index.js:3:16 the name `Table` is defined multiple times