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.tsDeno 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()
async function main() {
await Deno.writeTextFile("hello.txt", "Hello World\n");
}
main()
Compile Command
Deno compile -A index.ts
Deno compile -A index.ts
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
D
Deno
Chat about Deno, a modern runtime for JavaScript and TypeScript.