fix(docs): make local docs scripts work on Windows#1410
Open
janfrl wants to merge 2 commits into
Open
Conversation
|
@janfrl is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes the local docs dev flow on Windows.
The root
docs:devscript previously used POSIX-style inline environment syntax:That works in Unix shells, but fails on Windows because
cmd.exetreatsTMPDIR=/tmpas a command. This PR switches that part tocross-envso the existingTMPDIR=/tmpworkaround is preserved while making the script portable to Windows.The docs scripts also now run
nuxt prepare layerbefore 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 fromlayer/.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
Windows 10.0.26200AMD Ryzen 5 7600 6-Core Processor (12 cores)v24.13.13.36.1pnpm@11.8.04.4.82.13.4vite@7.3.3--