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

Error when trying to run supabase cli with Deno 2 #2900

Open
boda-sh opened this issue Nov 19, 2024 · 1 comment
Open

Error when trying to run supabase cli with Deno 2 #2900

boda-sh opened this issue Nov 19, 2024 · 1 comment

Comments

@boda-sh
Copy link

boda-sh commented Nov 19, 2024

Describe the bug
Hi, I've been trying to run the supabase CLI with Deno 2 and running into some error. Although I know my alternative solution is to use npx or bunx, but just want to raise this issue and start a conversation to see if this could be resovled one day.

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"
  }
}
  1. Install deps: deno install --allow-scripts
  2. 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/[email protected]/node_modules/supabase/bin/supabase:1:1)

Expected behavior
Deno 2 with deno run command should also be able to run the supabase CLI

System information

  • macOS 15.1.1 arm64
  • supabase cli: 1.223.10
  • deno 2.0.5 (stable, release, aarch64-apple-darwin)
@avallete
Copy link
Member

I think this is actually a Deno 2 issue as the binary will be running correctly if you do a direct call to it via /Users/folder/node_modules/.deno/[email protected]/node_modules/supabase/bin/supabase

I'll investigate with deno community about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants