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 pack` cannot find publint or attw when `vp` comes from a global npm install of vite-plus · Issue #2795 · voidzero-dev/vite-plus

vp pack cannot find publint or attw when vp comes from a global npm install of vite-plus #2795

New issue
Copy link
New issue
Copy link
Closed as duplicate
Bug
Closed as duplicate
vp pack cannot find publint or attw when vp comes from a global npm install of vite-plus#2795
Bug
Copy link
Labels
pending triage

Description

@dynamsoft-h
dynamsoft-h
opened on Sep 23, 2026
Issue body actions

Describe the bug

Disclaimer: I formatted this report with an LLM.

With vite-plus installed globally from mise use vite-plus, vp pack in a project that has
its own vite-plus and publint builds the bundle and then fails:

error: Pack failed: Error: Failed to import module "publint". Please ensure it is installed.

publint is installed in the project. npm run build passes. So does the same
vp pack through the global CLI from curl -fsSL https://vite.plus | bash,
which hands off to the project's vite-plus.

The npm package's vp does not hand off. It sees the project's copy
(vp --version prints Local vite-plus: v1.0.0-rc.0), but pack runs the
globally installed copy of tsdown, which looks for publint next to the global
install rather than in the project. attw fails the same way, with
Failed to import module "@arethetypeswrong/core". Both copies are
1.0.0-rc.0, so this is not a version mismatch.

This is a concrete case of what #2097 describes, with an error that sends you
looking in the wrong place. It is not only people who ran npm i -g by mistake:
mise's viteplus tool is backed by npm:vite-plus (see #943), so
mise use -g viteplus gives you this vp.

What I would like:

  1. When the npm package's vp runs in a project that has its own vite-plus, it
    hands off to that copy, as the installer's binary does.
  2. If that is not wanted, it stops with a clear message, as vp env already
    does ("The env command is only available in the global vp CLI"), rather
    than reporting an installed module as missing.

Reproduction

No URL, see below for reproduction steps.

Steps to reproduce

Create the project:

mkdir vp-global-repro && cd vp-global-repro && mkdir src
cat > package.json <<'EOF'
{
	"name": "vp-global-repro",
	"version": "0.0.0",
	"type": "module",
	"exports": "./dist/index.mjs",
	"scripts": { "build": "vp pack" },
	"devDependencies": {
		"publint": "^0.3.24",
		"vite-plus": "1.0.0-rc.0"
	}
}
EOF
cat > vite.config.ts <<'EOF'
import { defineConfig } from "vite-plus";

export default defineConfig({
	pack: {
		entry: "src/index.ts",
		publint: { level: "error" },
	},
});
EOF
echo 'export const answer = 42;' > src/index.ts
npm install
  1. Run npm run build. It builds and prints ✔ [publint] No issues found.

  2. Install the npm package globally and pack with it. A separate prefix keeps it
    away from any other global install:

    npm install -g --prefix /tmp/vp-npm-global [email protected]
    /tmp/vp-npm-global/bin/vp pack

    The build succeeds, then pack fails with the error above.

  3. For comparison, vp pack from the installer's vp in the same folder passes
    the publint check.

System Info

$ vp env current
Node.js:
  Version    24.11.0
  Source     system PATH
  Bin Path   /home/myuser/.local/share/zed/node/node-v24.11.0-linux-x64/bin/node
  Installed  true
  Mode       system_first

Package Manager:
  Name       npm
  Version    11.6.1
  Source     system PATH
  Bin Paths
    npm      /home/myuser/.local/share/zed/node/node-v24.11.0-linux-x64/bin/npm
    npx      /home/myuser/.local/share/zed/node/node-v24.11.0-linux-x64/bin/npx
  Installed  true
  Mode       system_first

$ vp --version
vp v1.0.0-rc.0

Local vite-plus:
  vite-plus  v1.0.0-rc.0

Tools:
  vite             v8.3.0
  rolldown         v1.2.9
  vitest           v5.0.1
  oxfmt            v0.70.0
  oxlint           v1.85.0
  oxlint-tsgolint  v7.0.2002
  tsdown           v0.23.0

Environment:
  Package manager  npm default
  Node.js          v24.21.0

Used Package Manager

npm

Logs

$ /tmp/vp-npm-global/bin/vp pack
ℹ entry: src/index.ts
ℹ Build start
ℹ Cleaning 1 files
ℹ dist/index.mjs  0.07 kB │ gzip: 0.08 kB
ℹ 1 files, total: 0.07 kB
✔ Build complete in 63ms
error: Pack failed: Error: Failed to import module "publint". Please ensure it is installed.

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.

Activity

  1. dynamsoft-h
    added the
    Bug
    issue type on Sep 23, 2026
  2. dynamsoft-h
    added
    pending triage
    on Sep 23, 2026
  3. fengmk2 commented on Sep 23, 2026

    @fengmk2
    fengmk2
    on Sep 23, 2026
    Member
    More actions

    Installing vite-plus with npm install -g is currently not a supported way to install the global vp CLI. This also applies to mise’s npm:vite-plus backend.

    The npm package provides the project-local CLI. Its vp entry point runs that installation directly. The standalone global CLI has different routing logic: it finds the project’s local vite-plus and delegates commands such as vp pack to it.

    Please use the official installer for the global CLI:

    curl -fsSL https://vite.plus | bash

    With your reproduction, this uses the project’s toolchain and resolves its installed publint correctly. Alternatively, you can continue using the local CLI through npm run build.

    The current error message does not explain this distinction clearly, so the confusion is understandable.

    Reacted by h-dynamsoft
  4. fengmk2
    closed this as a duplicateof Installation via mise-en-place #943 on Sep 23, 2026
  5. 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

No one assigned

    Labels

    pending triage

    Type

    Bug

    Fields

    Priority

    None yet

    Effort

    None yet

    Target date

    None yet

    Start date

    None yet

    Projects

    No projects

      Milestone

      No milestone

      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.