Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] deno compile binary does not work on other machines #2402

Open
Bloodiko opened this issue Apr 9, 2024 · 1 comment
Open

[bug] deno compile binary does not work on other machines #2402

Bloodiko opened this issue Apr 9, 2024 · 1 comment
Labels
bug Something isn't working.

Comments

@Bloodiko
Copy link

Bloodiko commented Apr 9, 2024

As I wanted to run my deno fresh app in a blacksite, with no internet access at all, I tried to use deno compile.

Issue

Starting the compiled binary on another host, than the compiling one will always throw the Error:

Could not find a deno.json file in the current directory or any parent directory.

More details

  • including deno.json by running deno compile --include deno.json main.ts will also create the same error.
  • Possibly relevant information:
    • I (cross) built both binaries on windows.
  • running the binary on the compiling host, no matter where it is on the system - will always work.

I guess, when using deno compile, something hard codes the deno.json path into the binary and it will be searched for in the hard-coded full-path, which it will never find on another system (unless the folder structure is identical).

I will link the test release with this exact binaries I built, so that they can be used for testing:
Binary Releases

@marvinhagemeister
Copy link
Collaborator

Thanks for reporting this. My guess is that it breaks on the part where we search for the deno.json file in the project directory by traversing upwards from Deno.cwd(). This probably needs to be handled differently.

@marvinhagemeister marvinhagemeister added the bug Something isn't working. label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants