nextra-docs-template icon indicating copy to clipboard operation
nextra-docs-template copied to clipboard

feat: upgrade to Next.js 15 and Nextra 3

Open sean-perkins opened this issue 11 months ago • 7 comments

Closes: #85, #84, #25

Upgrades the docs template to Next.js v15 and Nextra v3.

sean-perkins avatar Dec 19 '24 19:12 sean-perkins

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextra-docs-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 5:21pm

vercel[bot] avatar Dec 19 '24 19:12 vercel[bot]

If you can provide me with the Vercel logs I can take a closer look at whatever is failing in the deployment. The dev server is successful locally and the docs site builds with pnpm build.

sean-perkins avatar Dec 19 '24 20:12 sean-perkins

hey @sean-perkins , great work. Just came across your updates. For me locally using your sean-perkins:main branch gave me the following error:

❯ pnpm build

> [email protected] build /Users/johndoe/developer/nextra-docs-template
> next build

(node:20762) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
 ⨯ Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error

> Build error occurred
SyntaxError: Cannot use import statement outside a module
    at <unknown> (next.config.js:1)
 ELIFECYCLE  Command failed with exit code 1.

Checking the docs for nextra and then renaming next.config.js -> next.config.mjs fixed the dev and build. Maybe you want to give this a try and that will also fix the vercel build :)

  • node --version: v20.18.1
  • pnpm --version: 9.15.0

mavogel avatar Dec 21 '24 14:12 mavogel

@mavogel thanks for the suggestion! Not sure how I overlooked that warning in the terminal.

Enabling ESModules seems to have fixed the preview deployment.

sean-perkins avatar Dec 23 '24 17:12 sean-perkins

looks good to me!

ShrihariMohan avatar Dec 29 '24 06:12 ShrihariMohan

How long do these usually take to be merged? I am facing a new project and considering nextra if it is usable with next.js 15. TIA.

weisisheng avatar Jan 09 '25 12:01 weisisheng

Bro, it's time to upgrade to version 4

suprunchuk avatar Jan 14 '25 18:01 suprunchuk