voidzero-dev / voidzero-dev/vite-plus

Improve `npm install -g` and Node.js version management

Open
#1,986 4 comments 2 reactions 0 assignees View on GitHub
enhancement to be discussed
Dominant language
Rust
Stars
5.8k
Forks
262
Avg merge
1d 34m
Merged PRs (30d)
135

Description

Reference: https://github.com/voidzero-dev/vite-plus/pull/1974#issuecomment-4831760534, https://github.com/voidzero-dev/vite-plus/pull/1974#issuecomment-4831792749

Vite+ injects a prompt when `npm install -g` finishes and create shims to make bins accessible when the npm prefix is not in `$PATH`. This logic sometimes causes tricky bugs (https://github.com/voidzero-dev/vite-plus/pull/1974#issue-4762339551), and there is some overlap with vp install -g responsibilities.

According to https://github.com/voidzero-dev/vite-plus/issues/528, https://github.com/voidzero-dev/vite-plus/issues/540, `npm install -g` is used to satisfy users who want to install packages in one certain Node.js's bin directory. And the bin should be usable only when using this Node version.

I believe the there is a room to improve the interaction logic here.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the `npm install -g` and `vp install -g` interaction described here with the discussions in issues 528 and 540 and the referenced pull request comments. The work is done when the installation behavior, Node.js-version-specific bin availability, prompt handling, and shim responsibilities are clearly defined without the reported bugs or overlap.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, rust
Domain
cli, developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.