jeff.hykin
jeff.hykin4mo ago

`deno compile` offline [Solved]

- I've got a sandbox (the nix packaging system requires it) - I run deno compile a.js outside the sandbox. Works fine. - I copy $HOME/.cache/deno into the sandbox - I copy $TMP into the sandbox - I download denort-x86_64-unknown-linux-gnu.zip and copy it into the sandbox - (I don't know where to put it) - I run deno compile a.js in the sandbox (no internet permissions) and get: - error sending request for url (https://dl.deno.land/release/v1.44.4/denort-x86_64-unknown-linux-gnu.zip) Where can I put the denort.zip where deno will find it?
2 Replies
jeff.hykin
jeff.hykin4mo ago
Turns out copying over $HOME/.cache/deno should be sufficient, at least on Deno 1.44.4. My issue was different versions inside and outside of the sandbox
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 information you've provided, it seems like you're trying to run deno compile in an offline environment and encountering issues with Deno not finding the denort binary. From what you've described, it looks like you've done the right steps by copying the cache and the denort binary into the sandbox. However, Deno might not be aware of where to look for the denort binary within the sandbox. One thing you could try is setting the DENO_DIR environment variable to the path of the copied cache directory inside the sandbox. Deno uses this environment variable to determine where to look for the cache and binaries. Here's how you can set it:
export DENO_DIR=path/to/your/copied/cache
export DENO_DIR=path/to/your/copied/cache
Make sure to replace path/to/your/copied/cache with the actual path to the cache directory inside the sandbox. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. If this does not resolve your issue, you may need to explore other avenues or wait for further updates that might address offline compilation more directly.