Skip to content

rokuosan/repro-vp-staged-debug

Repository files navigation

repro-vp-staged-debug

Minimal reproduction for an issue where vp staged --debug fails when executed from a pre-commit hook.

Environment

  • vite-plus: 0.2.1
  • Node.js: v24.17.0
  • Package manager: pnpm
  • OS: macOS

How to reproduce

  1. Clone this repository.

  2. Install dependencies.

    mise install
    pnpm install
  3. Enable the pre-commit hook.

    vp config
  4. Modify any file and stage the changes.

    echo "test" >> README.md
    git add .
  5. Run commit.

    git commit -m "test"

Actual behavior

$ git commit -m "test"
node:internal/fs/promises:640
  return new FileHandle(await PromisePrototypeThen(
                        ^

Error: ENOENT: no such file or directory, open '/Users/rokuosan/repo/github.com/rokuosan/repro-vp-staged-debug/node_modules/.pnpm/vite-plus@0.2.1_@types+node@25.9.4_jiti@2.7.0_typescript@6.0.3_vite@8.0.16_@types+node@_22c8376b2772f074fc8311a0feee09c0/node_modules/vite-plus/dist/package.json'
    at async open (node:internal/fs/promises:640:25)
    at async Object.readFile (node:internal/fs/promises:1290:14)
    at async getVersion (file:///Users/rokuosan/repo/github.com/rokuosan/repro-vp-staged-debug/node_modules/.pnpm/vite-plus@0.2.1_@types+node@25.9.4_jiti@2.7.0_typescript@6.0.3_vite@8.0.16_@types+node@_22c8376b2772f074fc8311a0feee09c0/node_modules/vite-plus/dist/staged/bin.js:6490:20)
    at async lintStaged (file:///Users/rokuosan/repo/github.com/rokuosan/repro-vp-staged-debug/node_modules/.pnpm/vite-plus@0.2.1_@types+node@25.9.4_jiti@2.7.0_typescript@6.0.3_vite@8.0.16_@types+node@_22c8376b2772f074fc8311a0feee09c0/node_modules/vite-plus/dist/staged/bin.js:6542:59)
    at async file:///Users/rokuosan/repo/github.com/rokuosan/repro-vp-staged-debug/node_modules/.pnpm/vite-plus@0.2.1_@types+node@25.9.4_jiti@2.7.0_typescript@6.0.3_vite@8.0.16_@types+node@_22c8376b2772f074fc8311a0feee09c0/node_modules/vite-plus/dist/staged/bin.js:6747:18 {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/rokuosan/repo/github.com/rokuosan/repro-vp-staged-debug/node_modules/.pnpm/vite-plus@0.2.1_@types+node@25.9.4_jiti@2.7.0_typescript@6.0.3_vite@8.0.16_@types+node@_22c8376b2772f074fc8311a0feee09c0/node_modules/vite-plus/dist/package.json'
}

Node.js v24.17.0
VITE+ - pre-commit script failed (code 1)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors