GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `vp up -g` skips all global packages with EBADDEVENGINES when run inside a project with `devEngines.packageManager: pnpm` · Issue #2437 · voidzero-dev/vite-plus

vp up -g skips all global packages with EBADDEVENGINES when run inside a project with devEngines.packageManager: pnpm #2437

New issue
Copy link
New issue
Copy link
Closed
Bug
#2438
Closed
vp up -g skips all global packages with EBADDEVENGINES when run inside a project with devEngines.packageManager: pnpm#2437
Bug
#2438
Copy link
Assignees
jong-kyung
Milestone
RC

Description

@carlwangx
carlwangx
opened on Aug 13, 2026
Issue body actions

Describe the bug

vp up -g checks each global package for updates by shelling out to npm view <spec> version --json. The spawned npm inherits the caller's working directory, so when the command is run from inside a project whose package.json declares devEngines.packageManager with pnpm (the default scaffolded by vp create, with onFail: "download"), npm refuses to run any command there and exits with EBADDEVENGINES.

As a result every global package version check fails, each one is skipped with a warning, and vp up -g falsely reports:

All global packages are up to date

…while updates are actually available. Running the exact same command from a directory without a devEngines declaration (e.g. $HOME) finds and applies the updates.

This is the same failure class as #1893 (vp info → npm view → EBADDEVENGINES), but in a different code path that wasn't covered by that fix: the global registry helper spawns npm view without setting current_dir:

vite-plus/crates/vp_global_cli/src/commands/global/mod.rs

Lines 57 to 77 in 88873e1

async fn npm_view(
npm_path: &AbsolutePathBuf,
node_bin_dir: &AbsolutePathBuf,
package_spec: &str,
field: &str,
) -> Result<Vec<u8>, Error> {
let output = Command::new(npm_path.as_path())
.args(["view", package_spec, field, "--json"])
.env("PATH", format_path_prepended(node_bin_dir.as_path()))
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
.await?;
if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr).trim().to_string();
return Err(Error::Other(format!("npm view failed for {package_spec}: {stderr}").into()));
}
Ok(output.stdout)
}

Expected: the global update check should be independent of the project the shell happens to be in — e.g. run npm view with a neutral working directory (such as VP_HOME), since global package metadata has nothing to do with the local project.

I don't intend to submit a PR for this.

Reproduction

No repository needed — reproducible with a two-line package.json, see steps below.

Steps to reproduce

mkdir /tmp/repro && cd /tmp/repro
cat > package.json <<'EOF'
{
  "name": "repro",
  "devEngines": {
    "packageManager": { "name": "pnpm", "version": "11.17.0", "onFail": "download" }
  }
}
EOF
vp add -g wrangler   # any global package, installed at a non-latest version or not
vp up -g

Every global package prints warn: npm view failed for <pkg>: npm error code EBADDEVENGINES; skipping, then vp up -g reports "All global packages are up to date". Run cd ~ && vp up -g and the same packages are checked and updated normally.

System Info

$> vp env current
Environment:
  Version  24.19.0
  Source   lts

Tool Paths:
  node  /Users/carl/.vite-plus/js_runtime/node/24.19.0/bin/node
  npm   /Users/carl/.vite-plus/js_runtime/node/24.19.0/bin/npm
  npx   /Users/carl/.vite-plus/js_runtime/node/24.19.0/bin/npx

$> vp --version
vp v0.2.9

Local vite-plus:
  vite-plus  Not found

Environment:
  Package manager  Not found
  Node.js          v24.19.0

OS: macOS 26 (arm64)

Used Package Manager

pnpm

Logs

$> vp up -g   # run inside a project with devEngines.packageManager = pnpm
warn: npm view failed for @larksuite/cli: npm error code EBADDEVENGINES; skipping
warn: npm view failed for cf: npm error code EBADDEVENGINES; skipping
warn: npm view failed for pm2: npm error code EBADDEVENGINES; skipping
warn: npm view failed for skills: npm error code EBADDEVENGINES; skipping
warn: npm view failed for wrangler: npm error code EBADDEVENGINES; skipping
All global packages are up to date

# what npm itself says when invoked from that directory:
$> npm view wrangler version
npm error EBADDEVENGINES The developer of this package has specified the following through devEngines
npm error EBADDEVENGINES Invalid devEngines.packageManager
npm error EBADDEVENGINES Invalid name "pnpm" does not match "npm" for "packageManager"
npm error EBADDEVENGINES {
npm error EBADDEVENGINES   current: { name: 'npm', version: '11.17.0' },
npm error EBADDEVENGINES   required: { name: 'pnpm', version: '11.17.0', onFail: 'download' }
npm error EBADDEVENGINES }

# same command from $HOME immediately afterwards:
$> cd ~ && vp up -g
info: Updating 2 global packages with Node.js 24.19.0
✓ Updated @larksuite/cli to 1.0.86
✓ Updated wrangler to 4.122.0

Validations

  • Read the Contributing Guidelines.
  • Check that there isn't already an issue for the same bug.
  • Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
  • The provided reproduction is a minimal reproducible example.
Reacted by JongKyung Lee

Activity

  1. jong-kyung
    added the
    Bug
    issue type on Aug 13, 2026
  2. jong-kyung
    self-assigned this
    on Aug 13, 2026
  3. jong-kyung commented on Aug 13, 2026

    @jong-kyung
    jong-kyung
    on Aug 13, 2026
    Collaborator
    More actions

    Thank you for the detailed report. I was able to reproduce the issue. npm view inherits the current working directory, causing the lookup to fail in this case. I’m preparing a fix.

  4. fengmk2
    added this to the RC milestone on Aug 13, 2026
  5. fengmk2
    closed this as completedin #2438on Aug 13, 2026
  6. fengmk2
    added a commit that references this issue on Aug 13, 2026

    fix(global): run npm view in global mode (voidzero-dev#2438)

    This issue will close once commit 858ed05 is merged into the 'main' branch.
    858ed05
  7. fengmk2
    added a commit that references this issue on Oct 14, 2026

    chore(deps): update rust crates (#1780)

    62de578
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jong-kyung
    jong-kyung

Labels

No labels
No labels

Type

Bug

Fields

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

    Milestone

    • RC

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.