Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Next.js Starter to Next.js Version 15 from Version 14 #72

Open
theDeal opened this issue Feb 23, 2025 · 0 comments
Open

Migrate Next.js Starter to Next.js Version 15 from Version 14 #72

theDeal opened this issue Feb 23, 2025 · 0 comments

Comments

@theDeal
Copy link

theDeal commented Feb 23, 2025

Description:

Our project currently runs on Next.js version 14. With the release of Next.js version 15—featuring performance improvements, enhanced routing, and updated image optimization—it's time to upgrade our starter project. Note: This migration also requires updating Auth.js/NextAuth to version 5.0.0-beta.25 or higher to ensure authentication functionality works as expected. Additionally, make sure to complete the Shiki update as detailed in Issue #71 before starting this migration.

Migration Goals:

  • Upgrade Next.js: Update the project to use Next.js v15.
  • Authentication Update: Upgrade Auth.js/NextAuth to version 5.0.0-beta.25 or higher.
  • Pre-Requisite: Ensure Shiki has been migrated as per Issue Migrate Starter to Shiki Version 3 from Version 1 #71.
  • Code Refactoring: Address breaking changes, deprecated APIs, and configuration adjustments.
  • Testing & Documentation: Validate functionality across development and production environments, and update documentation accordingly.

Tasks:

  1. Pre-Requisite: Shiki Migration

  2. Update Next.js Dependency:

    • Modify the Next.js version in package.json from 14.x to 15.x.
    • Run your package manager (e.g., pnpm install or yarn install) to update dependencies.
  3. Update Auth.js/NextAuth:

    • Upgrade the Auth.js/NextAuth dependency to version 5.0.0-beta.25 or higher.
    • Review and update any authentication-related code to ensure compatibility with the new version.
    • Run npx @next/codemod@canary upgrade latest
    • Run npm i next@latest react@latest react-dom@latest eslint-config-next@latest
    • https://nextjs.org/docs/app/building-your-application/upgrading/version-15
  4. Review Breaking Changes:

    • Consult the Next.js 15 release notes for any breaking changes.
    • Update routing, image optimization configurations, and any custom server or middleware logic as required.
  5. Testing and Verification:

    • Run the development server to identify any immediate issues.
    • Execute the full test suite to catch regressions.
    • Manually verify that both the updated Next.js features and authentication flows work correctly in development and production builds.
  6. Documentation Updates:

Additional Context:

Migrating to Next.js version 15 and upgrading Auth.js/NextAuth are essential for keeping our starter project modern and fully functional. The authentication update is necessary due to compatibility requirements with Next.js 15, and ensuring that the Shiki migration (Issue #71) is complete beforehand will help prevent potential integration issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant