fix(ext/node): make execPath named export a real string#32396
Merged
bartlomieju merged 2 commits intodenoland:mainfrom Mar 2, 2026
Merged
fix(ext/node): make execPath named export a real string#32396bartlomieju merged 2 commits intodenoland:mainfrom
execPath named export a real string#32396bartlomieju merged 2 commits intodenoland:mainfrom
Conversation
The named ESM export `execPath` from `node:process` was a frozen object with `String.prototype` that pretended to be a string but had `typeof === "object"`. This broke libraries like execa that check `typeof execPath === "string"`, causing nuxt preview to fail. Now `execPath` is initialized as an empty string and set to `Deno.execPath()` during bootstrap, so both `process.execPath` and the named import are real strings. Closes denoland#25779 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
This will conflict with #28915. |
nathanwhit
approved these changes
Mar 2, 2026
Contributor
|
Let's add a test case |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
execPathfromnode:processwas a frozen object withString.prototypethat pretended to be a string but hadtypeof === "object". This broke libraries like execa that checktypeof execPath === "string", causingnuxt previewto fail withThe "nodePath" option must be a string or a file URL.execPathis initialized as""and set toDeno.execPath()during__bootstrapNodeProcess, so bothprocess.execPathand the named import are real strings.Before:
After:
Test plan
typeof execPath === "string"for both named import andprocess.execPathCloses #25779
🤖 Generated with Claude Code