Overview:
The Next.js Runtime package is responsible for managing the build process and creating the runtime environment for Next.js sites on Netlify. Typically, it is automatically used during the builds of Next.js sites without the need for manual installation. The package includes support for Next.js on Netlify, with prerequisites being Next.js 13.5 or later, Node.js 18 or later, and the latest version of the Netlify CLI.
Features:
- Automated Installation: Next.js Runtime is automatically used during builds of Next.js sites on Netlify.
- Prerequisites: Requires Next.js 13.5 or later, Node.js 18 or later, and the latest Netlify CLI.
- Manual Installation Options: Can be manually installed either through the UI or npm, with the ability to pin it to a specific version.
- Upgrade Support: Provides guidance on upgrading from v4 to v5 of the Next.js Runtime.
- Feedback Mechanism: Offers avenues for reporting bugs, opening issues, and sharing comments or feature requests.
Installation:
- The Next.js Runtime is automatically installed for new Next.js sites on Netlify.
- To manually install:
- From the UI: Navigate to the site to install the Next.js Runtime.
- Using npm: Add specific code to your netlify.toml file.
- For specific version requirements:
- Use v4 for Next.js 10-13.4 or Node.js under 18.
- Guidance on upgrading from v4 to v5 can be found in the v5 documentation.
Summary:
Next.js Runtime is a crucial package that automates the build process and sets up the runtime environment for Next.js sites on Netlify. While it typically does not require manual installation, users have the option to install it manually through the UI or npm. The package supports specific version requirements and provides a mechanism for feedback and version upgrades.