deno icon indicating copy to clipboard operation
deno copied to clipboard

import.meta.dirname is invalid [or undefined in some cases?] in binaries compiled for [or [in and for]] Windows

Open rojvv opened this issue 1 year ago • 4 comments

Code

console.log(typeof import.meta.dirname, import.meta.dirname?.length);

Output

image

deno --version

deno 1.42.4 (release, x86_64-pc-windows-msvc)
v8 12.3.219.9
typescript 5.4.3

rojvv avatar Apr 21 '24 07:04 rojvv

Another instance of accessing import.meta.dirname from compiled .exe that renders it as potentially being undefined.

image

rojvv avatar Apr 21 '24 07:04 rojvv

From a binary cross-compiled from Linux

image

rojvv avatar Apr 21 '24 09:04 rojvv