Skip to content

fix(docs): make local docs scripts work on Windows#1410

Open
janfrl wants to merge 2 commits into
nuxt-content:mainfrom
janfrl:main
Open

fix(docs): make local docs scripts work on Windows#1410
janfrl wants to merge 2 commits into
nuxt-content:mainfrom
janfrl:main

Conversation

@janfrl

@janfrl janfrl commented Jul 8, 2026

Copy link
Copy Markdown

Summary

This fixes the local docs dev flow on Windows.

The root docs:dev script previously used POSIX-style inline environment syntax:

TMPDIR=/tmp nuxt dev --extends ../layer

That works in Unix shells, but fails on Windows because cmd.exe treats TMPDIR=/tmp as a command. This PR switches that part to cross-env so the existing TMPDIR=/tmp workaround is preserved while making the script portable to Windows.

The docs scripts also now run nuxt prepare layer before starting or building the docs app. Without that, a fresh checkout can start the dev server but fail on first request because Vite tries to read generated layer TypeScript config files from layer/.nuxt, which does not exist yet.

Context

I’ve seen similar package-script issues in other Nuxt repositories too. I think it is worth using one script pattern that works across operating systems so contributors on Windows, macOS, and Linux can all run the same commands without shell-specific workarounds.

This was tested on Windows. The changes use standard package-script tooling and existing Nuxt commands, but I’m relying on maintainers/CI to confirm the behavior on macOS and Linux.

System info

Operating system Windows 10.0.26200
CPU AMD Ryzen 5 7600 6-Core Processor (12 cores)
Node.js version v24.13.1
nuxt/cli version 3.36.1
Package manager pnpm@11.8.0
Nuxt version 4.4.8
Nitro version 2.13.4
Builder vite@7.3.3
Config -
Modules -

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

@janfrl is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docus Ready Ready Preview Jul 9, 2026 12:13pm

@pkg-pr-new

pkg-pr-new Bot commented Jul 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/create-docus@1410
npm i https://pkg.pr.new/docus@1410

commit: 83a69fa

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

Successfully merging this pull request may close these issues.

1 participant