Questions tagged [n]

n is a CLI for managing multiple Node.js versions.

n is a CLI that facilitates installation of and easy switching between multiple Node.js versions.

46 questions
126
votes
17 answers

How to install a specific version of Node on Ubuntu?

I would like to install NodeJS version 0.8.18 on Ubuntu 12.04. I tried to install the newest version and then reverting to 0.8.18 by using nvm, but when I run my code apparently there is some problem with the packages installed and the two versions…
Masiar
  • 20,450
  • 31
  • 97
  • 140
62
votes
8 answers

Install Node.js to install n to install Node.js?

I have a problem understanding the use of n. Basically, it is clear that it is a version manager for Node.js such as nvm. But in contrast to nvm, which is basically a shell script, according to the documentation you are encouraged to use npm to…
Golo Roden
  • 140,679
  • 96
  • 298
  • 425
38
votes
4 answers

How to uninstall n and all node versions installed by n

I have installed some Node.js versions with the tool n. I have uninstalled all Node.js versions using: sudo n prune except the current (activated) version. If I try to unsinstall the current version: sudo n rm 6.10.2 I get the following…
BuZZ-dEE
  • 6,075
  • 12
  • 66
  • 96
15
votes
4 answers

n command does not activate specified version

Currently I have two versions of node installed on a Jenkins server. $ n list node/10.9.0 node/12.14.1 I'm trying to switch to version 10.9.0 for a specific build which requires it. I've tried first by using n but the latest 12.14.1 still…
lkisac
  • 2,007
  • 1
  • 26
  • 31
11
votes
4 answers

Different node version for different projects, is there a way of telling node which version to use?

I have a pretty common (i guess) problem. Many of my projects utilize nodejs, some for business logic, others only for some building task. I need to have different runtimes in different projects, one of my electron apps requires node 7.10.0, a…
Philipp Wrann
  • 1,751
  • 3
  • 19
  • 29
6
votes
1 answer

n (node version manager) not working after install - "bash: n: command not found"

I would like to manage node.js versions using the n - node version manager. I attempted to install n by following the Github docs https://github.com/tj/n and input the following in my terminal: sudo npm install -g n After entering my password my…
5
votes
1 answer

Heroku: Update Node to latest version

I would like to update my node version to latest version possible on my local machine. I am using Ubuntu 16.04. I am currently finding trouble to update with methods available to my best of knowledge. Please note that heroku-cli is up to date(as of…
Harry
  • 951
  • 2
  • 12
  • 18
3
votes
1 answer

Node version will not update using n

To give some context, I set up my machine using this Medium post, Don’t Use sudo with npm …still. I installed Node using brew about a year and a half ago, which installed v12.18.1. I also installed n at the time using brew, but never had to change…
bknoelle
  • 41
  • 1
  • 4
2
votes
1 answer

The npm version does not change when I change the node version with the n library

I want my npm version to match my node version but no matter what node version I change it to with the n library the npm version is always 8.19.2. I am on a MAC running Monterey.
ponder275
  • 903
  • 2
  • 12
  • 33
2
votes
1 answer

vue command not found on Mac

I simply did a npm install -g @vue/cli and it didn't work. Trying a vue --version after doing the install gave me a bash command not found error. I tried using sudo as well, but that didn't work. Tried uninstalling and reinstalling and that didn't…
Brian
  • 1,675
  • 3
  • 19
  • 29
2
votes
1 answer

/usr/bin/env: node --harmony: No such file or directory

I have searched online thru this site and others for a solution, so I finally bow my head and ask for help. It looks like most of the answers are identifying the node/nodejs naming conflict and creating symlinks as a solution. I don't have a…
KitakamiKyle
  • 83
  • 1
  • 10
2
votes
0 answers

automatic changing node and npm version to specified versions in the package.json

First: It is possible to automatically change the version of node and npm to the engine versions you specified in the package.json without manually run n or nvm? Next: Is there a version manager for npm? Sometimes i cannot install some packages over…
Chris Incoqnito
  • 235
  • 3
  • 12
1
vote
1 answer

Why doesn't "n" downgrade my node version on a Mac?

I’m using Mac Big Sur. I want to downgrade the version of Node. I tried the below (installing without sudo gives me permission errors) … $ sudo n 14.15.1 installed : v14.15.1 to /usr/local/bin/node active : v14.17.6 at…
Dave
  • 15,639
  • 133
  • 442
  • 830
1
vote
1 answer

How to install working recent node (stable/12.x) on Raspbian/Debian?

Trying to install stable nodejs (12.x) on a Debian-Buster based machine – specifically this Raspbian VM image. But everything fails in new, weird ways - like leaving node at 10.21.0, or installing a node executable that's obviously there but gives a…
gojomo
  • 52,260
  • 14
  • 86
  • 115
1
vote
2 answers

Switching Node versions give me `Cannot read property 'resolve' of undefined` from npm

I use the n version manager and when I change the Node version to 11.10 NPM stops working. $ n latest node/11.10.1 $ npm i sinon npm ERR! Cannot read property 'resolve' of undefined npm ERR! A complete log of this run can be found in: npm ERR! …
oligofren
  • 20,744
  • 16
  • 93
  • 180
1
2 3