0

I need a separate npm version besides my installed v1.4.21

How do I install it on my Ubuntu 14.10, to install this package, that requires npm v1.0.1?

I tried this instructions but it already fails with . ~/nvm/nvm.sh because it installs in the current folder in ./node_modules/nvm/

When I try

./node_modules/nvm/bin/nvm install 1.0.1

I get

~/.nvm/node-v1.0.1 doesn't exist, (need to downloaded first?) 1.0.1

How do I get npm v1.0.1 running?

Community
  • 1
  • 1
rubo77
  • 19,527
  • 31
  • 134
  • 226
  • You don't need v1.0.1. That's the package version. You can install it right now. – SLaks May 26 '15 at 18:59
  • sure, I tried that first to just install it with the installed npm version, but that [doesn't work](https://github.com/muaz-khan/WebRTC-Scalable-Broadcast/issues/3) – rubo77 May 26 '15 at 19:01
  • Read the error message. Your path is wrong. – SLaks May 26 '15 at 19:21
  • thx, i fixed it here: https://github.com/muaz-khan/WebRTC-Scalable-Broadcast/pull/4 – rubo77 May 26 '15 at 20:04

2 Answers2

1

I would recommend removing all your current node and npm versions
Uninstall Node.JS using Linux command line?
and then install nvm via these instructions:
http://www.wenincode.com/installing-node-jsnpm-without-sudo/

use curl:

$ curl https://raw.githubusercontent.com/creationix/nvm/v0.12.1/install.sh | bash

or use wget:

$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.12.

Once you've run either of those commands and NVM has finished downloading, run the following command:

$ source ~/.profile

Now NVM commands should be working in the terminal, try $ nvm to confirm the NVM command is working. If not, try restarting your terminal.

Once NVM is working you can install a version of node by using the following command:

$ nvm install [version-no]

To list the available versions, run this command:

$ nvm ls-remote

To install a version of node run:

$ nvm install <version no>
$ nvm install 0.10.29     //example

then when you want to use a specific version of node use

nvm use <version no>

Its the easiest way to use node imo and removes the need for sudo too which can cause issues.

Community
  • 1
  • 1
Craicerjack
  • 6,203
  • 2
  • 31
  • 39
0

The problem was: I didnt need the old nvm version, I just had to start it from within the folder:

cd ./node_modules/webrtc-scalable-broadcast/
node ./server.js

see: https://github.com/muaz-khan/WebRTC-Scalable-Broadcast/pull/4

rubo77
  • 19,527
  • 31
  • 134
  • 226