denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.21k stars 5.37k forks source link

Deno 2.0 RC Fails to Compile to Binary on Windows for Non-Administrator Users #26069

Open sevehub opened 3 weeks ago

sevehub commented 3 weeks ago

Version: deno 2.0.0-rc.10 v8 12.9.202.13-rusty typescript 5.6.2

When trying to compile a simple Deno script (console.log("deno 2.0");) into binary on Windows, non-administrator users encounter the error below that prevent successful compilation.

deno compile --output test.exe consolelog.ts
Check file:///C:/Users/User/workspace/work2024/consolelog.ts
Compile file:///C:/Users/User/workspace/work2024/consolelog.ts to test.exe
error: Writing temporary file 'test.exe.tmp-0468b123c82c0498'

Caused by:
    0: Failed reading: C:\Users\User\Application Data
    1: Access is denied. (os error 5)
yazan-abdalrahman commented 3 weeks ago

@satyarohith @sevehub Hello, I can't reproduce it at 2.0.0-rc.10.

image

PS D:\yad\deno> whoami
exalt\yazan.abdalrahman
PS D:\yad\deno> $AdminGroup = [Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
>> $AdminGroup.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
True
PS D:\yad\deno> .\target\debug\deno compile --output test.exe consolelog.ts
Compile file:///D:/yad/deno/consolelog.ts to test.exe
PS D:\yad\deno>
PS D:\yad\deno> whoami
desktop-cfbinqa\limer
PS D:\yad\deno> $AdminGroup = [Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
>> $AdminGroup.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
False
PS D:\yad\deno> .\target\debug\deno compile --output test.exe consolelog.ts
Check file:///D:/yad/deno/consolelog.ts
Compile file:///D:/yad/deno/consolelog.ts to test.exe
PS D:\yad\deno> .\target\debug\deno --version
deno 2.0.0-rc.10 (stable, debug, x86_64-pc-windows-msvc)
v8 12.9.202.13-rusty
typescript 5.6.2
PS D:\yad\deno>
riyadfebrian commented 2 weeks ago

i have the same issue with: deno 2.0.2 (stable, release, aarch64-apple-darwin) v8 12.9.202.13-rusty typescript 5.6.2

running on Mac M1 OS Sonoma 14.5.

BlowaterNostr commented 6 days ago

Same issue here

Download https://dl.deno.land/release/v2.0.3/denort-x86_64-unknown-linux-gnu.zip
error: Writing deno compile executable to temporary file 'build/backend/main.tmp-1d14ed01124a17a2'
Caused by:
    No such file or directory (os error 2)