Skip to content

Comments

Fix(#522): handle Windows NT extended-length path format prefixed paths from canonicalize()#523

Open
rxing365 wants to merge 1 commit intovercel-labs:mainfrom
rxing365:fix/nt-extended-path
Open

Fix(#522): handle Windows NT extended-length path format prefixed paths from canonicalize()#523
rxing365 wants to merge 1 commit intovercel-labs:mainfrom
rxing365:fix/nt-extended-path

Conversation

@rxing365
Copy link

Summary

Fix Windows path canonicalization issue that prevents Node.js daemon from starting properly

Problem

On Windows systems, the daemon fails to start when launched through Node.js.

Cause

In cli/src/connection.rs:278-281, the code uses canonicalize() to resolve symlinks:

let exe_path = env::current_exe().map_err(|e| e.to_string())?;
// Canonicalize to resolve symlinks (e.g., npm global bin symlink -> actual binary)
let exe_path = exe_path.canonicalize().unwrap_or(exe_path);  // <- Problem here
let exe_dir = exe_path.parent().unwrap();

On Windows, canonicalize() returns paths with the NT extended-length path prefix (\\?\). This format is incompatible with Node.js, causing the daemon startup to fail.

Fix

Add platform-specific path handling for Windows:

  • On Windows, after canonicalization, check for the \\?\ prefix
  • Strip or convert the path to a format Node.js can handle
  • Keep the original behavior for non-Windows platforms

@vercel
Copy link
Contributor

vercel bot commented Feb 22, 2026

Someone is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant