SocksS
Denoβ€’2y agoβ€’
6 replies
Socks

Deno compile not able to create files?

I want to create a simple CLI for a colleague at work that outputs a CSV file but I cannot seem to get Deno to create a file, even with the simplest of tests.

When I run this normally using Deno run -A index.ts it will work as intended but when compiled and run through the executable it will run successfully but no file is created.

Target OS: Windows
Dev OS: Mac M1 (arm)

CODE
async function main() {
  await Deno.writeTextFile("hello.txt", "Hello World\n");
}
main()


Compile Command
Deno compile -A index.ts
Was this page helpful?