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

could not find deno in path, please install deno #234

Closed
JSchermers opened this issue Sep 25, 2020 · 26 comments
Closed

could not find deno in path, please install deno #234

JSchermers opened this issue Sep 25, 2020 · 26 comments

Comments

@JSchermers
Copy link

JSchermers commented Sep 25, 2020

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

@lucacasonato
Copy link
Member

you have to connect vscode after updating the .bashrc

@JSchermers
Copy link
Author

tnx for your help. Maybe i do misunderstand you but I allready reconnected many times again.

  1. started vscode on ubuntu
  2. started docker container from vscode
  3. connected vscode to docker container
  4. inside that vscode i added the extension

@lucacasonato
Copy link
Member

If you open a terminal through VS Code in the container, is deno available there?

@JSchermers
Copy link
Author

yes... step 7. from my steps to reproduce

@kitsonk
Copy link
Contributor

kitsonk commented Oct 11, 2020

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

@JSchermers
Copy link
Author

JSchermers commented Oct 11, 2020

Hello and thx for your help. When i echo $PATH, this is the result. Deno is in my bash.rc for root

export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"

root@371b4a54741e:/# echo $PATH
/root/.deno/bin:/root/.vscode-server/bin/93c2f0fbf16c5a4b10e4d5f89737d9c2c25488a3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Everytime i reload the window VSCODE keeps telling deno is not in the PATH

@kitsonk
Copy link
Contributor

kitsonk commented Oct 11, 2020

And which deno from the integrated terminal within vscode?

@JSchermers
Copy link
Author

root@371b4a54741e:/# which deno
/root/.deno/bin/deno

@jcc10
Copy link

jcc10 commented Nov 6, 2020

I would like to add that this is not isolated to a single user. I am on Pop!_OS 20.04 which is based off the same Ubuntu version.
deno is in path and can be run by any terminal and, in fact, the terminal within vscode itself.

digitalkitsune@pop-os:~/github/oak_websoket_middleware$ which deno
/home/digitalkitsune/.deno/bin//deno

@jcc10
Copy link

jcc10 commented Nov 14, 2020

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.

@alfredzh
Copy link

I have the same issue!
My install steps is almost same as JSchermers!

@losintikfos
Copy link

losintikfos commented Dec 3, 2020

I had the same issue. I resolved it with:

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

  • Restart vscode.

@jcc10
Copy link

jcc10 commented Dec 3, 2020

Seeing as @losintikfos fix works. (But don't forget to change to your home directory!) I think this may be a issue in vscode-languageserver, possibly L422-L435 in client/src/node/main.ts

If someone who knows how to debug VSCode extensions could verify the path being used that would help. It may be that the ExecutableOptions needs to be set with the cwd or env option. (If I am reading the src correctly, I may not be. Seriously, don't trust me.)

@gilbertoalbino
Copy link

I had the same issue. I resolved it with:

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

Same solution here! Thanks 👍

@teroyks
Copy link

teroyks commented Feb 1, 2021

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

Screenshot 2021-02-01 at 12 32 14

@teroyks
Copy link

teroyks commented Feb 1, 2021

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.

@tim-field
Copy link

tim-field commented Feb 6, 2021

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/

@andreyddk
Copy link

Same problem, I use flatpak vscode. Tried install deno via script and pacman.
vscode terminal:

$ deno --version
deno 1.7.4 (release, x86_64-unknown-linux-gnu)
v8 9.0.123
typescript 4.1.4
echo $PATH
/home/whiteserk/.nvm/versions/node/v12.20.1/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

@lucacasonato
Copy link
Member

This has likely been resolved in the 3.x branch of the extension.

@rsgilbert
Copy link

It hasnt been resolved yet but the work around of using ln works

@vicary
Copy link

vicary commented Sep 27, 2022

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)

@anilf01
Copy link

anilf01 commented Mar 20, 2023

In linux, I fix this issue by using this command

sudo ln -s /home/desktop-name/.deno/bin/deno /usr/local/bin/deno

@vixalien
Copy link

vixalien commented Mar 6, 2024

@andreyddk did you find a solution for using deno inside a flatpak VS Code?

@andreyddk
Copy link

andreyddk commented Mar 6, 2024

@andreyddk did you find a solution for using deno inside a flatpak VS Code?

Hi! Actually I dont remember exactly, but you can 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

@vixalien
Copy link

vixalien commented Mar 6, 2024 via email

@zzz6519003
Copy link

we should solve this from root

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

No branches or pull requests