vscode_deno: could not find deno in path, please install deno

I hoped for intellisence on deno commands in .ts files and .js files when installing this extension.

I’m on Ubuntu , gnome

Steps to reproduce

  1. i created a docker container
  2. started container
  3. connected vscode to docker container
  4. inside container switched user, added sudo rights
  5. installed deno with curl according the docs.
  6. updated .bashrc for new user with export path 7.reload vscode
  7. deno works in terminal
  8. installed deno vscode extension 10 added .vscode/settings.json to root of project { “deno.enable”: true }
  9. added .ts or .js file to project and tried deno. --> no intellisence, only “Could not find ‘deno in your $PATH’…” at bottom right of screen

**Allready tried **

  1. reinstalling extension
  2. reinstalling deno under root user
  3. changed settings.json to different locations

tnx for any advice or help

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 9
  • Comments: 26 (5 by maintainers)

Most upvoted comments

I had the same issue. I resolved it with:

  • sudo ln -s /home/losintikfos/.deno/bin/deno /usr/bin

  • Restart vscode.

Same issue, perhaps related to fish shell image

Work around for a homebrew installed deno was sudo ln -s /opt/homebrew/bin/deno /usr/local/bin/

Could I request a interim fix being a option to override to a manually entered path to a Deno Executable?

I would add that just in general as a backup as sometimes you may want to run a specific version of Deno as opposed to the global one and a workspace override would allow for that.

@JSchermers which deno and echo $PATH from the integrated terminal within vscode please…

Thanks. That worked! Didn’t need to give the flatpak access to that directory since it already has host access.

On Wed, 6 Mar 2024, 07:13 Andrey Dudnik, @.***> wrote:

@andreyddk https://github.com/andreyddk did you find a solution for using deno inside a flatpak VS Code?

Hi! Actually I dont remember exactly, but you cant try install deno via script on official site in $HOME/.deno, next install the Flatseal and set permissions for vscode to file system of $HOME/.deno

— Reply to this email directly, view it on GitHub https://github.com/denoland/vscode_deno/issues/234#issuecomment-1980101105, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJB5FCOYUACYS6WVTCOQ5KDYW2QWXAVCNFSM4R2D66K2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJYGAYTAMJRGA2Q . You are receiving this because you commented.Message ID: @.***>

I still have this issue, installed Deno via Homebrew but the extension can’t seem to find the executable.

I have to manually set deno.path in VS Code settings.json as a workaround.

which deno shows /opt/homebrew/bin which is already in echo $PATH.

I am using oh-my-zsh so I suspect that VS Code gives a different environment to the extension, without loading up the omz plugins? The homebrew PATH comes from ~/.zprofile instead of ~/.zshrc which maybe the clue here.

The contents of my .zprofile has only one line:

eval $(/opt/homebrew/bin/brew shellenv)

Note: for me, the workaround is not starting VS Code “normally” (ie. from the /Applications folder or the Launchpad). When I instead navigate to my project directory in the terminal and then start VS Code with code . it works.

I have the same issue on macOS. Screenshot is from the VS Code internal terminal.

Screenshot 2021-02-01 at 12 32 14