Skip to content

fix(global): install packages into final prefix#1698

Draft
liangmiQwQ wants to merge 1 commit into
voidzero-dev:mainfrom
liangmiQwQ:codex/install-global-direct-prefix
Draft

fix(global): install packages into final prefix#1698
liangmiQwQ wants to merge 1 commit into
voidzero-dev:mainfrom
liangmiQwQ:codex/install-global-direct-prefix

Conversation

@liangmiQwQ
Copy link
Copy Markdown
Contributor

@liangmiQwQ liangmiQwQ commented May 27, 2026

Close #664

The current global package install flow runs npm install -g in a temporary prefix and then moves the installed package prefix into VP_HOME/packages. npm creates global bin links relative to the prefix used during installation, so moving that prefix can leave installed binaries pointing at the wrong location.

This PR installs global packages directly into their final package prefix. It removes an existing same-name managed package before install, writes package metadata during the parallel install phase, then checks bin conflicts and creates shims after installs finish.

If one package in a multi-package install fails, this PR still finalizes shims for packages that already installed successfully instead of deleting them or leaving them without runnable bins.

This PR also updates the local/tarball global install snapshot to execute installed bins and cover the partial-failure case.

🤖 Generated with Codex.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for viteplus-preview ready!

Name Link
🔨 Latest commit a37bd9f
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a1843f6a7000600089a077e
😎 Deploy Preview https://deploy-preview-1698--viteplus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@liangmiQwQ liangmiQwQ changed the title fix: install global packages into final prefix fix(global): install packages into final prefix May 27, 2026
@liangmiQwQ liangmiQwQ force-pushed the codex/install-global-direct-prefix branch from 21941bc to 3e97d03 Compare May 27, 2026 22:33
@liangmiQwQ liangmiQwQ force-pushed the codex/install-global-direct-prefix branch from 3e97d03 to a37bd9f Compare May 28, 2026 13:32
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.

vp install -g ./some-local-package not working

1 participant