docs: document incompatibility for Next.js storefront + Node v25 (#14538)
This commit is contained in:
@@ -2,6 +2,7 @@ import { DetailsList, Prerequisites } from "docs-ui"
|
||||
import CmaOptionTroubleshooting from "../troubleshooting/_sections/nextjs/cma-option.mdx"
|
||||
import CorsErrorTroubleshooting from "../troubleshooting/_sections/other/cors-errors.mdx"
|
||||
import ModuleXErrorTroubleshooting from "../troubleshooting/_sections/common-installation-errors/module-x-error.mdx"
|
||||
import Node25Troubleshooting from "../troubleshooting/_sections/create-medusa-app-errors/nextjs-node-25.mdx"
|
||||
|
||||
export const metadata = {
|
||||
title: `Next.js Starter Storefront`,
|
||||
@@ -25,7 +26,7 @@ This guide helps technical users set up the Next.js Start storefront. If you're
|
||||
|
||||
<Prerequisites items={[
|
||||
{
|
||||
text: "Node.js v20+",
|
||||
text: "Node.js v20+ LTS, less than v25",
|
||||
link: "https://nodejs.org/en/download"
|
||||
},
|
||||
{
|
||||
@@ -54,7 +55,7 @@ For other information related to the Medusa application's installation, refer to
|
||||
|
||||
<Prerequisites items={[
|
||||
{
|
||||
text: "Node.js v20+",
|
||||
text: "Node.js v20+ LTS, less than v25",
|
||||
link: "https://nodejs.org/en/download"
|
||||
},
|
||||
{
|
||||
@@ -113,6 +114,10 @@ Your Next.js Starter storefront is now running at `http://localhost:8000`.
|
||||
{
|
||||
title: `Resolve "Cannot find module X" Errors`,
|
||||
content: <ModuleXErrorTroubleshooting />
|
||||
},
|
||||
{
|
||||
title: `Issues when installing with Node v25+`,
|
||||
content: <Node25Troubleshooting />
|
||||
}
|
||||
]}
|
||||
/>
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
If you install the Next.js Starter Storefront with Node v25+, you may encounter the following error when starting the storefront:
|
||||
|
||||
```bash
|
||||
[TypeError: localStorage.getItem is not a function]
|
||||
```
|
||||
|
||||
### Why this Error Occurred
|
||||
|
||||
This error occurs because the Next.js Starter Storefront uses Next.js v15.3.8, which doesn't yet support Node v25+.
|
||||
|
||||
The error is related to changes in Node v25+ that affect how certain web APIs, like `localStorage`, are handled in server-side environments.
|
||||
|
||||
---
|
||||
|
||||
### How to Fix it
|
||||
|
||||
Our team is actively working on updating the Next.js Starter Storefront to support Node v25+. In the meantime, you can resolve this error by downgrading your Node.js version to v24 LTS or lower.
|
||||
@@ -7,6 +7,7 @@ import DbUrlError from "../_sections/create-medusa-app-errors/db-url-error.mdx"
|
||||
import ForwardingError from "../_sections/create-medusa-app-errors/forwarding.mdx"
|
||||
import SaslSection from '../_sections/database-errors/sasl.mdx'
|
||||
import ModuleXErrorSection from '../_sections/common-installation-errors/module-x-error.mdx'
|
||||
import Node25Troubleshooting from "../_sections/create-medusa-app-errors/nextjs-node-25.mdx"
|
||||
|
||||
export const metadata = {
|
||||
title: `Common create-medusa-app Errors`,
|
||||
@@ -58,6 +59,12 @@ This troubleshooting guide covers common errors you may encounter when using the
|
||||
|
||||
---
|
||||
|
||||
## Issues when installing with Node v25+
|
||||
|
||||
<Node25Troubleshooting />
|
||||
|
||||
---
|
||||
|
||||
## Resolve "Cannot find module X" Errors
|
||||
|
||||
<ModuleXErrorSection />
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import Node25Troubleshooting from "../_sections/create-medusa-app-errors/nextjs-node-25.mdx"
|
||||
|
||||
export const metadata = {
|
||||
title: `Next.js Starter Storefront on Node v25+ Issues`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
This troubleshooting guide addresses issues that may arise when installing or running a Medusa application with the Next.js Starter Storefront on Node.js version 25 or higher.
|
||||
|
||||
## Error After Installing with Node v25+
|
||||
|
||||
<Node25Troubleshooting />
|
||||
Reference in New Issue
Block a user