-
Notifications
You must be signed in to change notification settings - Fork 6k
Labels
Description
Repro:
❯ deno run -A npm:nuxi init
# just press enter at each prompt
❯ cd nuxt-app
❯ deno task build
❯ deno task preview
ERROR The "nodePath" option must be a string or a file URL: /home/.deno/bin/deno. 2:34:33 PM
at safeNormalizeFileUrl (node_modules/nuxi/dist/chunks/index3.mjs:36:9)
at handleNodeOption (node_modules/nuxi/dist/chunks/index3.mjs:2473:29)
at normalizeOptions (node_modules/nuxi/dist/chunks/index3.mjs:2630:64)
at handleAsyncArguments (node_modules/nuxi/dist/chunks/index3.mjs:7642:63)
at execaCoreAsync (node_modules/nuxi/dist/chunks/index3.mjs:7617:110)
at callBoundExeca (node_modules/nuxi/dist/chunks/index3.mjs:7844:5)
at boundExeca (node_modules/nuxi/dist/chunks/index3.mjs:7815:44)
at Object.run (node_modules/nuxi/dist/chunks/preview.mjs:132:11)
at eventLoopTick (ext:core/01_core.js:175:7)
at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.b8b195e1.mjs:1648:16)
ERROR The "nodePath" option must be a string or a file URL: /home/.deno/bin/deno
I looked into this. The issue is that the named export of execPath from node:process is not actually a string, but an object that tries to act like a string:
deno/ext/node/polyfills/process.ts
Lines 344 to 357 in 55c22ee
| export let execPath: string = Object.freeze({ | |
| __proto__: String.prototype, | |
| toString() { | |
| execPath = Deno.execPath(); | |
| return execPath; | |
| }, | |
| get length() { | |
| return this.toString().length; | |
| }, | |
| [Symbol.for("Deno.customInspect")](inspect, options) { | |
| return inspect(this.toString(), options); | |
| }, | |
| // deno-lint-ignore no-explicit-any | |
| }) as any as string; |
Reactions are currently unavailable