vercel / vercel/vercel-plugin

[Windows] False "Vercel CLI not installed" warning when username contains non-ASCII characters

Open
#30 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
287
Forks
58
Avg merge
1d 1h
Merged PRs (30d)
17

Description

Bug: The session startup hook reports "IMPORTANT: The Vercel CLI is not installed"
even though Vercel CLI is correctly installed.

Root cause: resolveBinaryFromPath() in session-start-profiler.mjs uses
accessSync(path, X_OK) to locate the Vercel binary. On Windows, when the user's
home directory path contains non-ASCII characters (e.g. accented letters like "é"
in "Andrés"), the PATH entries are decoded with a different encoding (Windows
code page, e.g. CP850), causing accessSync to receive a corrupted path that
doesn't exist — resulting in ENOENT and a false negative.

Environment:

  • OS: Windows 10 (10.0.19045)
  • Username: contains accented character (é)
  • npm global path: C:\Users\Andrés\AppData\Roaming\npm\vercel.cmd
  • Vercel CLI version: 50.39.0 (verified via vercel --version)
  • Plugin version: 0.24.0

Reproduction: Install Vercel CLI globally on Windows with a username
containing non-ASCII characters. Every Claude Code session startup shows
the "not installed" warning.

Workaround: None currently. The CLI works fine — only the detection fails.

Suggested fix: Fall back to spawning vercel --version directly (via
execFileSync('vercel', ...)) when resolveBinaryFromPath returns null on
Windows, as the shell resolves .cmd extensions correctly regardless of path encoding.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading resolveBinaryFromPath() in session-start-profiler.mjs and trace how Windows PATH entries reach accessSync(). Reproduce the session startup on Windows with a non-ASCII username, then verify that an installed Vercel CLI no longer triggers the warning while normal missing-CLI detection still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.