From 47509f81da063b92ed89f35314894b9a72a60c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Born=C3=B6?= Date: Thu, 12 Jan 2023 08:47:52 +0100 Subject: [PATCH 1/2] Fix capitalization in format-server-error.ts --- packages/next/src/lib/format-server-error.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/src/lib/format-server-error.ts b/packages/next/src/lib/format-server-error.ts index c89d7bcd3e70d..3b6765baf256e 100644 --- a/packages/next/src/lib/format-server-error.ts +++ b/packages/next/src/lib/format-server-error.ts @@ -30,7 +30,7 @@ export function formatServerError(error: Error): void { error, `${error.message} -This might be caused by a React Class component being rendered in a server component, React Class components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component` +This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component` ) return } From d355b323e211130fe7cdce0b83d85134ae6df569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Born=C3=B6?= Date: Thu, 12 Jan 2023 10:00:54 +0100 Subject: [PATCH 2/2] Fix error --- .../acceptance-app/server-components.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/development/acceptance-app/server-components.test.ts b/test/development/acceptance-app/server-components.test.ts index b99b0ed134263..ef71837e65271 100644 --- a/test/development/acceptance-app/server-components.test.ts +++ b/test/development/acceptance-app/server-components.test.ts @@ -331,13 +331,13 @@ createNextDescribe( .waitForElementByCss('#nextjs__container_errors_desc') .text() ).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) return 'success' }, 'success') expect(next.cliOutput).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) await cleanup() @@ -384,13 +384,13 @@ createNextDescribe( .waitForElementByCss('#nextjs__container_errors_desc') .text() ).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) return 'success' }, 'success') expect(next.cliOutput).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) await cleanup() @@ -437,13 +437,13 @@ createNextDescribe( .waitForElementByCss('#nextjs__container_errors_desc') .text() ).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) return 'success' }, 'success') expect(next.cliOutput).toContain( - 'This might be caused by a React Class component being rendered in a server component' + 'This might be caused by a React Class Component being rendered in a Server Component' ) await cleanup()