Noob node.js installation problem: -bash: __git_ps1: command not found - node.js

I'm now starting to learn node.js following an online course, but I get into trouble after I installed the latest node.js through their official website.
I'm a Mac user, as I follow the course to check if node.js is installed correctly in terminal by typing node -v, it shows the following:
https://i.stack.imgur.com/5vOSK.png
Even if I tried to install nvm as I google for solution, it said ==> nvm is already installed, but at the last sentence it said :
-bash: __git_ps1: command not found
But when I check if node is installed, it shows:
https://i.stack.imgur.com/Q3QBb.png
I appreciate for your help as I can't go on learning node.js because of this. Thanks a lot.

Related

Trying to install NodeJS on older mac

I'm using homebrew to install a few REPLs. I already succeeded with Ruby/irb, but now, when I try to install the javascript REPL with brew install node I get an error message. Then when I try to run node in terminal, I get the -bash: node: command not found.
I've tried searching for the relevant versions of nodejs for High Sierra, hoping I'd find which version worked with that specific OS, but no luck. I did find that I can input brew search node to get a list of available node versions, but I still don't know which one, and I don't want to make a serious mistake and fudge my system. Does anyone have a solution/suggestion?

-bash: node: command not found [duplicate]

I'm learning laravel and follwing this tutorial,
But when I went try and install npm, is says bash: npm: command not found
If you have already installed nodejs and still getting this error. npm: command not found..
run this
apt-get install -y npm
I also come here for the same problem, The solution I found is to install npm and then restart the Visual Studio Code
in redhat base OS (tested in centos 7)
yum install nodejs npm -y
in debian base OS
apt-get install -y npm
I am following the same tuturial and I had this issue and how I solved is just download the
8.11.4 LTS version
from this link then install it then the command worked just fine!
I know it's an old question. But it keeps showing in google first position and all it says it's "install node.js".
For a newbie this is not obvious, so all you have to do is go to the node.js website and search for the command for your linux distribution version or any other operating system. Here is the link:
https://nodejs.org/en/download/package-manager/
In this page you have to choose your operating system and you'll find your command. Then you just log into your console as a root (using putty for instance) and execute that command.
After that, you log as normal user and go again inside your laravel application folder and run again npm install command, and it should work.
Hope it helps.
The solution is simple.
After installing Node, you should restart your VScode and run npm install command.
If you already installed npm globally on your system, and you are still getting the above error message by using VSCode terminal. Just close your VSCode application and reopen again, that should resolve the issue.
First You need to check the node version using terminal (not gitbash)
node --version
npm --version
if those exists, Restart your pc and check
Cheers !!
In my case it was entirely my fault (as usual) I was changing the system path under the environment variables, in Windows, and messed up the path for Node/NPM. So the solution is to either re-add the path for NPM, see this answer
or the lazy option: re-install it which will re-add it for you.

npm get prefix: command not found

Trying to install firebase on the command line, can't do it because I probably need to change npm permissions. Problem is, when I run "npm get prefix" it comes back with "command not found". I know I have node.js, npm, git and bower installed, but I am very new to the command line and can't find anything online that references this. Can anyone help? Using Mac OSX.
I should specify what was going on here: I tried re-installing node.js a few times and it didn't work. I was re-installing the most recent version and for some reason my terminal didn't see it. The problem was fixed when I installed the LTS (Long Term Support) version.

bash: npm: command not found?

I'm learning laravel and follwing this tutorial,
But when I went try and install npm, is says bash: npm: command not found
If you have already installed nodejs and still getting this error. npm: command not found..
run this
apt-get install -y npm
I also come here for the same problem, The solution I found is to install npm and then restart the Visual Studio Code
in redhat base OS (tested in centos 7)
yum install nodejs npm -y
in debian base OS
apt-get install -y npm
I am following the same tuturial and I had this issue and how I solved is just download the
8.11.4 LTS version
from this link then install it then the command worked just fine!
I know it's an old question. But it keeps showing in google first position and all it says it's "install node.js".
For a newbie this is not obvious, so all you have to do is go to the node.js website and search for the command for your linux distribution version or any other operating system. Here is the link:
https://nodejs.org/en/download/package-manager/
In this page you have to choose your operating system and you'll find your command. Then you just log into your console as a root (using putty for instance) and execute that command.
After that, you log as normal user and go again inside your laravel application folder and run again npm install command, and it should work.
Hope it helps.
The solution is simple.
After installing Node, you should restart your VScode and run npm install command.
If you already installed npm globally on your system, and you are still getting the above error message by using VSCode terminal. Just close your VSCode application and reopen again, that should resolve the issue.
First You need to check the node version using terminal (not gitbash)
node --version
npm --version
if those exists, Restart your pc and check
Cheers !!
In my case it was entirely my fault (as usual) I was changing the system path under the environment variables, in Windows, and messed up the path for Node/NPM. So the solution is to either re-add the path for NPM, see this answer
or the lazy option: re-install it which will re-add it for you.

nvm: command not found

Good evening. Faced such problem: I'm trying to install node.js, following these instructions https://academy.appgyver.com/installwizard/steps?from=steroids_frontpage_sign_up#/git. But the terminal does not see .nvm command:-(. I tried this Node Version Manager install - nvm command not found, but I did not find .bash_profile or .profile.
Please, help!
One may find it easier to follow this tutorial in installing Node.js on a Mac.
http://coolestguidesontheplanet.com/installing-node-js-on-osx-10-10-yosemite/
Hope this helps!

Resources