Jess182
Jess1826mo ago

Deno compiled bin not create file

Hi, I have a script that create file with Deno.writeFileSync() on current location When run script with deno, the file is created I compiled script with all permissions to target macOS ARM When I run bin, image isn't saved & no errors Do you know what its happen?
1 Reply
Deno AI Helper
Deno AI Helper6mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, there are a few things to consider: 1. When you compile a Deno script into a standalone binary, the permissions need to be explicitly set at compile time. Make sure you've included the --allow-write flag when compiling your script to ensure the binary has permission to write files. 2. The current working directory for a compiled Deno binary might be different from what you expect. It's possible that the file is being created, but not in the location you're looking. You can use Deno.cwd() in your script to check the current working directory. 3. Ensure that the path where you're trying to write the file exists and that the user running the binary has the necessary permissions to write to that directory. 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 might want to consider reaching out to the Deno community for further assistance.