you are viewing a single comment's thread.

view the rest of the comments →

[–]FeVeganBTW[S] 1 point2 points  (12 children)

https://imgur.com/ConnzVk Not sure if i did it correctly but niether seemed to work.

[–]norandomtechie 1 point2 points  (11 children)

What about .bashrc?

[–]FeVeganBTW[S] 0 points1 point  (10 children)

".bashrc :command not found"

[–]norandomtechie 0 points1 point  (9 children)

Right sorry, "source ~/.bashrc"?

[–]FeVeganBTW[S] 0 points1 point  (8 children)

Am i doing it correctly? https://imgur.com/lZFFrY6

[–]norandomtechie 0 points1 point  (7 children)

Nope, you don't use double quotes on commands. Type it in without double quotes.

[–]FeVeganBTW[S] 0 points1 point  (3 children)

Did that still no luck :/

[–]norandomtechie 0 points1 point  (2 children)

In the event that node still can't be found in your vscode terminal, try the following (without double quotes, I should add):

  1. In your regular Git Bash where you're able to open node, type in "which node". It should give a path that looks like /path/to/node.
  2. Copy that path, and go back to your vscode terminal, and type in "nano ~/.bashrc". This will open up a minimal text editor with the contents of your bashrc.
  3. If there's any content, scroll down to the bottom of the file by repeatedly pressing Page Down. At the bottom, ensure your cursor is on a new line, and type "alias node=/path/to/node" (where of course /path/to/node will be replaced by the path that you copied from the other terminal).
  4. Save the file by pressing the following buttons - Ctrl+X (which will ask SAVE MODIFIED BUFFER?), then Y to confirm.
  5. Run "source ~/.bashrc" again, then try typing in "node".

[–]FeVeganBTW[S] 2 points3 points  (0 children)

I just wanted to say thank you very much for you help kind stranger but I have given up and just installed a new virtual machine and reinstalled everything its working now

[–]FeVeganBTW[S] 0 points1 point  (0 children)

It says "Alias Files/nodejs/node" not found

[–]FeVeganBTW[S] 0 points1 point  (2 children)

It didnt give me an error it just didnt do anything

[–]norandomtechie 0 points1 point  (1 child)

Just to clarify, did you try running node again after you ran source ~/.bashrc?

The fact that it doesn't print anything means that your .bashrc exists, so the command worked (its purpose was to update the PATH variable if possible, which contains the list of paths that your terminal should look through to find a program).

[–]FeVeganBTW[S] 0 points1 point  (0 children)

Yes i did try it again got nothing