From 9d6d769f808539d49b16b82515942412b42650b9 Mon Sep 17 00:00:00 2001 From: haverchuck Date: Tue, 22 Oct 2024 16:21:27 -0700 Subject: [PATCH 1/3] fix(js): specify next js versions more explicitly --- src/fragments/start/getting-started/next/setup.mdx | 1 + .../nextjs-app-router-client-components/index.mdx | 6 ++++++ .../[platform]/build-a-backend/restapi/gen-ai/index.mdx | 2 +- .../gen1/[platform]/start/getting-started/setup/index.mdx | 6 ++++++ .../start/project-setup/create-application/index.mdx | 6 ++++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/fragments/start/getting-started/next/setup.mdx b/src/fragments/start/getting-started/next/setup.mdx index 25a4202bc10..3126f6eabaf 100644 --- a/src/fragments/start/getting-started/next/setup.mdx +++ b/src/fragments/start/getting-started/next/setup.mdx @@ -1,6 +1,7 @@ This tutorial is built using the pages directory from NextJS. To learn more about using Amplify with the NextJS app directory please visit this [documentation page](/gen1/[platform]/build-a-backend/server-side-rendering/set-up-ssr/#use-amplify-with-nextjs-app-router-app-directory). +**Note:** We currently support Next JS versions 13.5.0 up to 14.x. We are investigating support for later versions. diff --git a/src/pages/[platform]/start/quickstart/nextjs-app-router-client-components/index.mdx b/src/pages/[platform]/start/quickstart/nextjs-app-router-client-components/index.mdx index 086032158b9..8725f662a87 100644 --- a/src/pages/[platform]/start/quickstart/nextjs-app-router-client-components/index.mdx +++ b/src/pages/[platform]/start/quickstart/nextjs-app-router-client-components/index.mdx @@ -32,6 +32,12 @@ This Quickstart guide will walk you through how to build a task list application - [git](https://git-scm.com/) v2.14.1 or later - If you are new to these technologies, we recommend you go through the official [React](https://react.dev/learn/tutorial-tic-tac-toe), [Next.js](https://nextjs.org/docs/getting-started/installation), and [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html) tutorials first. + + +**Note:** We currently support Next JS versions 13.5.0 up to 14.x. We are investigating support for later versions. + + + ## Deploy a fullstack app to AWS We've created a starter "To-do" application to help get started faster. First, you will create a repository in your GitHub account using our starter Next template. diff --git a/src/pages/gen1/[platform]/build-a-backend/restapi/gen-ai/index.mdx b/src/pages/gen1/[platform]/build-a-backend/restapi/gen-ai/index.mdx index 7a15b46f8f5..9c637be4da4 100644 --- a/src/pages/gen1/[platform]/build-a-backend/restapi/gen-ai/index.mdx +++ b/src/pages/gen1/[platform]/build-a-backend/restapi/gen-ai/index.mdx @@ -41,7 +41,7 @@ With Amplify and Amazon Bedrock, you can create a generative AI application easi For this we will use React and Next.js to take advantage of the full managed hosting of Next.js server-side rendering (SSR) capabilities in Amplify Hosting. The first step is to create a new Next.js project using yarn, npm, pnpm, or Bun. ```bash -npx create-next-app@latest +npx create-next-app@14 ``` ```bash diff --git a/src/pages/gen1/[platform]/start/getting-started/setup/index.mdx b/src/pages/gen1/[platform]/start/getting-started/setup/index.mdx index a22cb3014bb..282134cc84c 100644 --- a/src/pages/gen1/[platform]/start/getting-started/setup/index.mdx +++ b/src/pages/gen1/[platform]/start/getting-started/setup/index.mdx @@ -234,6 +234,12 @@ npm create next-app@14 -- next-amplified --ts --no-eslint --src-dir --import-ali cd next-amplified ``` + + +**Note:** We currently support Next JS versions 13.5.0 up to 14.x. We are investigating support for later versions. + + + This command will bootstrap the project with the following options: - App Router diff --git a/src/pages/gen1/[platform]/start/project-setup/create-application/index.mdx b/src/pages/gen1/[platform]/start/project-setup/create-application/index.mdx index b8645c754b8..b135c6ef139 100644 --- a/src/pages/gen1/[platform]/start/project-setup/create-application/index.mdx +++ b/src/pages/gen1/[platform]/start/project-setup/create-application/index.mdx @@ -62,6 +62,12 @@ Run the following command and following the instructions to create a Next.js app npx create-next-app@">=13.5.0 <15.0.0" next-amplified ``` + + +**Note:** We currently support Next JS versions 13.5.0 up to 14.x. We are investigating support for later versions. + + + Then run the following command to enter the root of your Next.js app. ```shellscript From d43f0350606f1955ddbbd0002b1cb9ffbc7b988e Mon Sep 17 00:00:00 2001 From: haverchuck Date: Tue, 22 Oct 2024 17:09:30 -0700 Subject: [PATCH 2/3] chore(js): fixed Next.js reference --- src/fragments/start/getting-started/next/setup.mdx | 2 +- .../quickstart/nextjs-app-router-client-components/index.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fragments/start/getting-started/next/setup.mdx b/src/fragments/start/getting-started/next/setup.mdx index 3126f6eabaf..9bfc17e4615 100644 --- a/src/fragments/start/getting-started/next/setup.mdx +++ b/src/fragments/start/getting-started/next/setup.mdx @@ -1,7 +1,7 @@ This tutorial is built using the pages directory from NextJS. To learn more about using Amplify with the NextJS app directory please visit this [documentation page](/gen1/[platform]/build-a-backend/server-side-rendering/set-up-ssr/#use-amplify-with-nextjs-app-router-app-directory). -**Note:** We currently support Next JS versions 13.5.0 up to 14.x. We are investigating support for later versions. +**Note:** We currently support Next.js versions 13.5.0 up to 14.x. We are investigating support for later versions. diff --git a/src/pages/[platform]/start/quickstart/nextjs-app-router-client-components/index.mdx b/src/pages/[platform]/start/quickstart/nextjs-app-router-client-components/index.mdx index 8725f662a87..8aaa31104cf 100644 --- a/src/pages/[platform]/start/quickstart/nextjs-app-router-client-components/index.mdx +++ b/src/pages/[platform]/start/quickstart/nextjs-app-router-client-components/index.mdx @@ -34,7 +34,7 @@ This Quickstart guide will walk you through how to build a task list application -**Note:** We currently support Next JS versions 13.5.0 up to 14.x. We are investigating support for later versions. +**Note:** We currently support Next.js versions 13.5.0 up to 14.x. We are investigating support for later versions. From 2572e7d542b948c333bd244a7de3219b016411c8 Mon Sep 17 00:00:00 2001 From: haverchuck Date: Tue, 22 Oct 2024 17:14:52 -0700 Subject: [PATCH 3/3] fixed gen1 --- .../[platform]/start/getting-started/setup/index.mdx | 9 +++------ .../start/project-setup/create-application/index.mdx | 6 ------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/pages/gen1/[platform]/start/getting-started/setup/index.mdx b/src/pages/gen1/[platform]/start/getting-started/setup/index.mdx index 282134cc84c..eb11648e65b 100644 --- a/src/pages/gen1/[platform]/start/getting-started/setup/index.mdx +++ b/src/pages/gen1/[platform]/start/getting-started/setup/index.mdx @@ -223,6 +223,9 @@ cd amplify-app This tutorial is built using the [Next.js App Router](https://nextjs.org/docs/app/building-your-application/routing). +**NOTE:** Amplify JS v6 supports Next.js with the version range: `>=13.5.0 <15.0.0`. +Ensure you have the correct version to integrate with Amplify. + To set up the project, you'll first create a new Next.js app with [Create Next App](https://nextjs.org/docs/api-reference/create-next-app), a simple CLI tool that enables you to quickly start building a new Next.js application, with everything set up for you. You'll then add Amplify and initialize a new project. @@ -234,12 +237,6 @@ npm create next-app@14 -- next-amplified --ts --no-eslint --src-dir --import-ali cd next-amplified ``` - - -**Note:** We currently support Next JS versions 13.5.0 up to 14.x. We are investigating support for later versions. - - - This command will bootstrap the project with the following options: - App Router diff --git a/src/pages/gen1/[platform]/start/project-setup/create-application/index.mdx b/src/pages/gen1/[platform]/start/project-setup/create-application/index.mdx index b135c6ef139..b8645c754b8 100644 --- a/src/pages/gen1/[platform]/start/project-setup/create-application/index.mdx +++ b/src/pages/gen1/[platform]/start/project-setup/create-application/index.mdx @@ -62,12 +62,6 @@ Run the following command and following the instructions to create a Next.js app npx create-next-app@">=13.5.0 <15.0.0" next-amplified ``` - - -**Note:** We currently support Next JS versions 13.5.0 up to 14.x. We are investigating support for later versions. - - - Then run the following command to enter the root of your Next.js app. ```shellscript