Unable to install node 7.5.0 - node.js

I am trying to install nodejs in a docker container
Using curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
as per the instructions on nodejs.org
But it seems to always install v 0.10.29
Will appreciate any help on this

Or you can just use the prebuilt node Docker image on DockerHub
RUN apt-get update
RUN apt-get install -y curl nodejs
RUN curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash

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

Not able to install Node 10.x version in docker container

I have all the code to install nodejs 10.x verison inside ubuntu docker file, but its listing only the old version when am using node -v and not the latest one. PFB the dockerfile for more understanding
FROM selenium/node-chrome-x.x.x
RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
RUN apt-get install nodejs
RUN sudo ln -s /usr/bin/nodejs /usr/local/bin/node
RUN node -v
Expected output
Node version 10.x
Actual output
Node Version is 4.86
Please let us know how to setup the latest nodejs version and use it for other tool setup
I have modified your Dockerfile and used image that you require. I had to install some dependencies like curl and so on. Also I just run one RUN command to create less intermediate layers :
FROM selenium/node-chrome:2.53.1
RUN sudo apt-get update &&\
sudo apt-get -y install curl &&\
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - &&\
sudo apt-get -y install nodejs &&\
sudo ln -s /usr/bin/nodejs /usr/local/bin/node
RUN node -v
The output is :
v10.16.0

How To Install Node Js In Ubuntu 18.10?

i'm trying to install nodejs in Ubuntu 18.10 but it returns some error.
The following packages have unmet dependencies:
nodejs : Depends: python-minimal but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Above is the message i get while install node Js by cammand: sudo apt-get install nodejs.
As described in this link:
Install node version manager:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
Activate nvm:
. ~/.nvm/nvm.sh
Use nvm to install the version of node you want:
nvm install 4.4.5
Test that Node.js is installed:
node -e "console.log('Running Node.js ' + process.version)"
The recommended way to install node under Ubuntu appears to be to use the archives provided by NodeSource.
Their instructions are to run these shell commands to, presumably, set up a PPM and install a current version of node from that source.
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
First you need to install python 2.7 using following commands
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python2.7
then install nodejs
sudo apt-get install nodejs
Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt-get install -y nodejs
Using Debian, as root
curl -fsSL https://deb.nodesource.com/setup_15.x | bash -
apt-get install -y nodejs

Package 'npm' has no installation candidate

I want to install npm in Debian 9.
I've tried:
apt-get install nodejs
completely installed and nodejs -v results: v4.8.2.
but when try to run npm an error says:
bash: npm: command not found
Base on my searches I've tried other ways:
based on this guide: https://www.godaddy.com/help/install-nodejs-ubuntu-17395 I've tried:
sudo apt-get install npm
results:
E: Package 'npm' has no installation candidate
Based on another guide I've tried:
wget https://npmjs.org/install.sh
sudo chmod +x install.sh
sudo ./install.sh
results:
npm cannot be installed without node.js.
of course I've installed nodejs. I also tried this way:
curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get update
sudo apt-get install --yes nodejs
It says:
nodejs is already the newest version (4.8.2~dfsg-1).
What should I do?
Remove the old version
sudo apt-get purge nodejs
Install the new version:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
Alternatively, for Node.js 9:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
Source
It might tell you that you are missing package gnupg2, just install it.

Error when adding generator-jhipster via YARN

I ran the following command to install the generator-jhipster via yarn:
yarn global add generator-jhipster
After doing so, I ran into the following issue:
The engine "node" is incompatible with this module. Expected version ">=6.9.5"
Any clue as to how I can get around this issue?
TIA
Install node 6.9.5 or more recent.
Update node to the latest version.
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Once your install is complete, you can confirm you version with another command:
node -v
To Download latest node
https://nodejs.org/en/download/package-manager/
Node.js v5:
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
Node.js v6:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
Node.js v7::
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
Node.js v8::
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
You can also try to use
yarn --ignore-engines

Resources