Skip to content

fix(env): keep env print session-scoped#1974

Closed
liangmiQwQ wants to merge 1 commit into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/fix-env-print-session-version
Closed

fix(env): keep env print session-scoped#1974
liangmiQwQ wants to merge 1 commit into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/fix-env-print-session-version

Conversation

@liangmiQwQ

Copy link
Copy Markdown
Collaborator

The current vp env print prepends the resolved Node runtime bin directory to PATH. That makes npm install -g believe Node-version-specific global bins are stable, so Vite+ skips creating links in ~/.vite-plus/bin even though those bins disappear when the user changes projects or Node versions.

This PR changes vp env print to print a session VP_NODE_VERSION assignment instead. The shims still resolve the requested Node version, while ~/.vite-plus/bin remains the stable PATH surface.

🤖 Generated with Codex

@netlify

netlify Bot commented Jun 28, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 8dd53c7
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a411e587c15980008a7e52e

@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

This seems only to

@liangmiQwQ liangmiQwQ closed this Jun 28, 2026
@liangmiQwQ liangmiQwQ deleted the liang/codex/fix-env-print-session-version branch June 28, 2026 13:40
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

I found its root cost is the prepend node logic, and I launch my terminal with Node.js so some PATH is injected by mistake. But I think this is still a bug need fixing.

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