Auxy
Auxy4mo ago

deno compile error

When I try and run deno compile, I get the following error
$ deno compile day2.js
Check file:///C:/Users/cambe/JSprojects/AdventOfCode2023/day2.js
Compile file:///C:/Users/cambe/JSprojects/AdventOfCode2023/day2.js to day2.exe
error: Writing deno compile executable to temporary file 'day2.exe.tmp-b5a4393eacce0cd4'

Caused by:
0: Failed reading: C:\Users\cambe\Application Data
1: Access is denied. (os error 5)
# cambe @ Cams_PC in ~\JSprojects\AdventOfCode2023 [01:29:31] C:1
$
$ deno compile day2.js
Check file:///C:/Users/cambe/JSprojects/AdventOfCode2023/day2.js
Compile file:///C:/Users/cambe/JSprojects/AdventOfCode2023/day2.js to day2.exe
error: Writing deno compile executable to temporary file 'day2.exe.tmp-b5a4393eacce0cd4'

Caused by:
0: Failed reading: C:\Users\cambe\Application Data
1: Access is denied. (os error 5)
# cambe @ Cams_PC in ~\JSprojects\AdventOfCode2023 [01:29:31] C:1
$
I have restarted my PC and updated deno, however that had not fixed the issue.
3 Replies
Leokuma
Leokuma4mo ago
Have you tried running the command in a prompt opened as Administrator?
Auxy
AuxyOP4mo ago
Yes, it gives me the same result
WhiskeyLima
WhiskeyLima5d ago
I had the same issue, it turns out this is this is the error that happens when there is no deno.json file in the project. Adding an empty one made it so compile worked for me.

Did you find this page helpful?