How to install nvm with curl script? - node.js

I am trying to install nvm using curl on ubuntu 20.04. I am getting below error messages when nvm is installed through curl. Is there any other flag that needs to be attached to supress below error?
Machine configuration:
vm: Ubuntu 20.04.5 LTS
curl: curl 7.68.0 (x86_64-pc-linux-gnu)
Commands:
sudo apt update
sudo apt install curl
#installing nvm
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
Error Message:
curl: (92) HTTP/2 stream 0 was closed cleanly, but before getting all response header fields, treated as error

Related

NodeJS Issue with Ubuntu server with Docker

I install nodejs using this command:
sudo apt install nodejs
Then when installation is complete
I tried to run some script but has error
[my script command]
When I run this script using nodejs the error occur
My ubuntu version and Nodejs version:
Uninstall that nodejs version
sudo apt-get remove nodejs
Install latest version of nodejs
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
After this try to run your file
node yourfile

Installing nodejs fro react native

I am trying following from official site with following code:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
but ended with the following error:
Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting
What would be the possible solution?
From the commands above, it is obvious you are on Debian Linux Distro,
enter the following commands on your terminal to install NodeJS:
sudo apt-get install build-essential checkinstall
sudo apt-get install libssl-dev
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
=> Close and reopen your terminal, then enter the following commands on your terminal:
command -v nvm
nvm install 5.0
nvm use 5.0
nvm alias default node
The above will install version 5.0 of NodeJS on your box.
Hope this helps...

Installing Nodejs v8.2.1 in ubuntu 17.04

How to install Nodejs v8.2.1 in Ubuntu 17.04. When I give the command 'sudo app install nodejs' the version that gets installed is v4.7.2. - Thanks
There is a good article from NodeJS itself (found by searching for "install node js ubuntu"). You can find it here
You just need to execute the following commands to get the newest NodeJS version.
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
I would also suggest installing nvm so you could run multiple NodeJS versions side by side.
Using the Node Version Manager NVM
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
$ nvm install node
$ node -v

Unable to install nodejs on Ubuntu 16.04

The command I ran was
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
and the error i got was
Error executing command, exiting
I don't know what could be reason for the error as the information provided is sparse! But try installing node using nvm (Node Version Manager). It surely helps you when switching back and forth to older and newer versions.
https://github.com/creationix/nvm
Follow this link. This should work.

how to install nodejs through command on Ubuntu 15.10

I am not able to install nodejs latest version getting errors. I have a fab file which I use to install nodejs. Following is the definition which I use.
def install_nodejs():
cmds = ['sudo apt-get remove --purge nodejs npm',
'wget http://deb.nodesource.com/setup -O /tmp/setup.sh',
'/bin/bash -x /tmp/setup.sh']
for cmd in cmds:
sudo(cmd)
packages = ['python-software-properties', 'g++', 'make', 'ruby-compass', 'nodejs']
cuisine.package_ensure(packages)
On cmd:
fab install_nodejs -H admin#core.small.team
Error:
echo '## Your distribution, identified as "wily", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support'
Fatal error: sudo() received nonzero return code 1 while executing!
Requested: /bin/bash -x /tmp/setup.sh
Executed: sudo -S -p 'sudo password:' /bin/bash -l -c "/bin/bash -x /tmp/setup.sh"
To install a specific version of nodeJs (current TLS 10.15.3 for example)
You can use NVM (Node version manager) :
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh -o install_nvm.sh
bash install_nvm.sh
nvm install 10.15.3
Then enjoy.
Good luck

Resources