Error when adding generator-jhipster via YARN - node.js

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

Related

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

Node version doesn't change after attempted upgrade in Ubuntu

In my Ubuntu machine, I am attempting to update my version of Node. I run curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
then I run sudo apt-get install -y nodejs
After this, my version of node remains unchanged:
ubuntu:~$ node -v
v6.10.3
use nvm, a version manager for node
https://github.com/creationix/nvm
To download node you install nvm and type nvm install <version>
This will download both node and npm
To change which node version you want to use you type nvm use <version>
For more detail check out the repo ^^
Running this worked for me finally.
Uninstall:
sudo apt-get purge nodejs
sudo apt-get autoremove
nvm deactivate
nvm uninstall node_version
(Source)
Install the New Version:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
If there are errors here, run these 2:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
wget -qO - https://raw.githubusercontent.com/yarnpkg/releases/gh-pages/debian/pubkey.gpg | sudo apt-key add -
Install New Version of Node:
wget -qO - https://raw.githubusercontent.com/yarnpkg/releases/gh-pages/debian/pubkey.gpg | sudo apt-key add -

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.

How to bring `npm` back?

I installed nodejs via nvm on Ubuntu server, and found issues with jenkins tasks. So I uninstalled nvm, and reinstalled nodejs by
sudo apt-get install curl
curl --silent --location https://deb.nodesource.com/setup_5.x | sudo bash -
sudo apt-get install nodejs
And now on my Ubuntu server, the node is back but npm wasn't, how to reinstall npm?
This is my command echo back:
$ node -v
5.8.0
$ npm -v
-bash: /home/ubuntu/.nvm/versions/node/v5.8.0/bin/npm: No such file or directory
I think this will help you:
sudo apt-get install --reinstall npm
Finally I found the solution:
curl http://npmjs.org/install.sh | sudo sh

Resources