platodev
platodev4mo ago

Windows compile

not sure how to debug this output isnt clear to me
deno compile --target x86_64-pc-windows-msvc -o hello.exe main.ts -Verb RunAs Administrator
Compile file:///C:/Users/Administrator/denotest/main.ts to hello.exe
"C:/Users/Administrator/scoop/apps/tar/current/bin/tar.exe": Cannot connect to C: resolve failed
[0m [1m [31merror [0m: Writing hello.exe

Caused by:
Failed to unpack archive.
deno compile --target x86_64-pc-windows-msvc -o hello.exe main.ts -Verb RunAs Administrator
Compile file:///C:/Users/Administrator/denotest/main.ts to hello.exe
"C:/Users/Administrator/scoop/apps/tar/current/bin/tar.exe": Cannot connect to C: resolve failed
[0m [1m [31merror [0m: Writing hello.exe

Caused by:
Failed to unpack archive.
1 Reply
Deno AI Helper
Deno AI Helper4mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the output you've provided, it seems like there might be an issue with the tar utility on your system, which Deno uses internally during the compilation process. The error message "C:/Users/Administrator/scoop/apps/tar/current/bin/tar.exe": Cannot connect to C: resolve failed suggests that there might be a problem with the tar executable that Deno is trying to use. This could be due to a variety of reasons, such as incorrect path settings, permissions issues, or a problem with the tar installation itself. One thing to note is that the deno compile command you've used includes -Verb RunAs Administrator, which is not a valid flag for the deno compile command. This might be a PowerShell command to run the compiler as an administrator, but it should not be included as part of the deno compile command itself. Here's the corrected command without the PowerShell flag:
deno compile --target x86_64-pc-windows-msvc -o hello.exe main.ts
deno compile --target x86_64-pc-windows-msvc -o hello.exe main.ts
If you want to run the Deno compiler as an administrator, you should open an elevated PowerShell or Command Prompt and then run the corrected deno compile command. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. If the issue persists, you may want to ensure that your tar installation is working correctly and that you have the necessary permissions to execute it.