maverickdoge
maverickdoge3w ago

installed deno, btu not working

Hi, I installed deno on my mac. Trying to run simple Deno.serve((_request: Request) => { return new Response("Hello, world!"); }); but getting error "Cannot find name Deno"?
7 Replies
patrickalima98
Is this error in vscode?
maverickdoge
maverickdoge3w ago
yes i have installed the extension though
numberkruncher
Do you have a deno.json file in the same directory structure?
maverickdoge
maverickdoge3w ago
I am using it in a supabase project, is it than needed?
marvinh.
marvinh.3w ago
1. Is the deno.json file in the root directory of your project? Workspaces are not supported yet in the Deno extension. It's currently under active development 2. Make sure the extension is enabled. There is a Deno: Enable command that you can use. 3. If it's still not working file an issue here https://github.com/denoland/deno/issues/new/choose
maverickdoge
maverickdoge3w ago
@marvinh. the deno.json file was missing. It wasn't anywhere in the supabase docs, but now looked into the deno docs to get it. But the thing is i wanna run it and so something like "deno run server.ts" I get a deno not found in my terminal eventhough I have it installed on my mac
marvinh.
marvinh.3w ago
Sounds like the deno binary is not present in your $PATH environment. You should have these lines in your terminal configuration after a successful installation (.zshrc for zsh, .bashrc for bash, etc):
# deno
export DENO_INSTALL="/Users/marvinh/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
# deno
export DENO_INSTALL="/Users/marvinh/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"