deno run fail to execute npm binary file in 2.0

Describe the bug Hi there, Andrew from supabase, we've been having report of users failing to use supabase CLI with Deno 2 and running into some error executing the compiled binary. To Reproduce Steps to reproduce the behavior: 1. Have Deno 2 installed 2. Create a new directory, and run deno init in it 3. The following content been added to deno.json
{
# install deps in a node_modules directory
"nodeModulesDir": "auto",
"imports": {
"supabase": "npm:supabase@^1.223.10"
}
}
{
# install deps in a node_modules directory
"nodeModulesDir": "auto",
"imports": {
"supabase": "npm:supabase@^1.223.10"
}
}
4. Install deps: deno install --allow-scripts 5. Try run the CLI with deno run -A npm:supabase --help Sees the following error in terminal:
❯ deno run -A npm:supabase --help
error: Uncaught SyntaxError: Invalid or unexpected token
at <anonymous> (file:///Users/folder/node_modules/.deno/supabase@1.219.2/node_modules/supabase/bin/supabase:1:1)
❯ deno run -A npm:supabase --help
error: Uncaught SyntaxError: Invalid or unexpected token
at <anonymous> (file:///Users/folder/node_modules/.deno/supabase@1.219.2/node_modules/supabase/bin/supabase:1:1)
Debug: Running /Users/folder/node_modules/.deno/supabase@1.219.2/node_modules/supabase/bin/supabase properly execute the binary. Expected behavior Deno 2 with deno run command should also be able to run the supabase CLI Additional context Considering opening an issue into deno repository but I wanted to ask the community if someone managed to run binaries via deno run before. Or if there is a known issue that we could follow / contribute to. Version: Deno 2.0.6
4 Replies
bartlomieju
bartlomieju4w ago
Hey, i would actually appreciate an issue on GitHub
Gyen Abubakar
Gyen Abubakar3w ago
@Andrew Valleteau did you find a solution for this?>
Andrew Valleteau
Andrew ValleteauOP2w ago
@Gyen Abubakar nope, but I opened an issue as requested: https://github.com/denoland/deno/issues/27114 so it's in the radar
GitHub
deno run fail to execute npm binary file in 2.0 · Issue #27114 · de...
Describe the bug Hi there, Andrew from supabase, we've been having report of users failing to use supabase CLI with Deno 2 and running into some error executing the compiled binary. To Reproduc...
Gyen Abubakar
Gyen Abubakar2w ago
i came from there 😅