You are not logged in.

#26 2016-03-13 23:18:44

perchslayer
Member
From: Auburn, California - US
Registered: 2016-01-12
Posts: 115
Website

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

Head_on_a_Stick wrote:

A simple `apt-get install nodejs npm` would have installed those without ever running the script at all.

Head_on_a_Stick wrote:

Remember: if you can't `apt-get` it, it's probably not worth having wink


OMG!!!!

The time, energy, etc. I put into this going about it the wrong way is big, by my standards. This was an expensive lesson.
One wonders, why did I not think to look there before? And why did none of the sites that suggest the download, simply suggest it in this way? [ rhetorical question ]

But I thank you for helping me with this. Someday, when I get big......oh, nevermind.

Thanks.


Roland Shield
Grill Jockey, Lounge Maven, Unrepentant Agitator
ass.clown@perchslayer.com | "...'ere I am, J.H."

Offline

#27 2016-03-13 23:45:02

damo
....moderator....
Registered: 2015-08-20
Posts: 4,382

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

@ perchslayer

Couple of tips before installing anything...

Check the Debian repos to see if you what you want can be got there ( Menu -> Help -> Debian -> Package Search )

Look up the apt commands (`man apt-get` etc). You can see what the outcome of apt-get will be by using the "-s" ( =simulate) switch.

[damo@debian ~]$ sudo apt-get install -s nodejs npm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  gyp libc-ares-dev libc-ares2 libjs-node-uuid libjs-underscore libssl-dev libssl-doc libv8-3.14-dev
  libv8-3.14.5 node-abbrev node-ansi node-ansi-color-table node-archy node-async node-block-stream
  node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fstream
  node-fstream-ignore node-github-url-from-git node-glob node-graceful-fs node-gyp node-inherits node-ini
  node-json-stringify-safe node-lockfile node-lru-cache node-mime node-minimatch node-mkdirp node-mute-stream
  node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-qs node-read
  node-read-package-json node-request node-retry node-rimraf node-semver node-sha node-sigmund node-slide
  node-tar node-tunnel-agent node-underscore node-which nodejs-dev

I have to admit I didn't check the repos earlier - I just assumed you were having to install it from somewhere else sad


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#28 2016-03-14 00:14:43

perchslayer
Member
From: Auburn, California - US
Registered: 2016-01-12
Posts: 115
Website

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

Thank you again. This is really good stuff. From now on, that is my plan. But by now, gosh, I have plenty of "stuff", but I just need to know how to use it.

BTW, this new text editor called Atom is really nice for those of us like myself that don't have the keyboard chops down for VIM or Emacs. And it has some nice slick advantages over Geany too. And it installs on BL without a hiccup or hitch.

So if you hear of anyone like me who needs to "get in the game" and get started, you might let them know. Just thought I would mention.
https://atom.io/docs/v0.194.0/getting-s … lling-atom

Peace and out.


Roland Shield
Grill Jockey, Lounge Maven, Unrepentant Agitator
ass.clown@perchslayer.com | "...'ere I am, J.H."

Offline

#29 2018-03-29 08:25:14

rrimantas
New Member
Registered: 2018-03-29
Posts: 1

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

Head_on_a_Stick wrote:

Right, the script needs to be run as root, which is not very wise at all.

Use:

sudo -i
apt-get purge bunsen-os-release
curl -sL https://deb.nodesource.com/setup_5.x | bash -
apt-get install nodejs
apt-get install bunsen-os-release
exit

Generally speaking, you should *never* download and run random scripts as root.

Thanks alot, that worked for me. I even was able to install Angular/latest, but only if I choose

... curl -sL https://deb.nodesource.com/setup_6.x | bash - ...

I was curious, what it means:

 sudo -i

but I was able to return (from root) to regular account after several? "exit" in terminal.

Offline

#30 2018-03-29 09:00:11

D219
Member
Registered: 2017-02-23
Posts: 29

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

As a fellow node.js developer on Bunsenlabs, what I do on a fresh install is using NVS. No need to start anything as sudo, install work wonderfully, and you have the added bonus of being able to switch node.js version at will.

Offline

#31 2018-06-27 16:14:52

imp2021
Member
Registered: 2015-10-02
Posts: 31

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

D219 suggestion looks great, I use a similar thing vor python.. but I want to intall npm.

$ sudo apt-get install npm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package npm

HALP

Offline

#32 2018-06-27 17:19:36

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,029

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

Do it this way:

sudo apt-get install nodejs-legacy		
sudo ln -s /usr/bin/nodejs /usr/sbin/node

Then , if you want the latest node (for security audits) do:

sudo npm install npm@latest -g

Offline

#33 2018-06-28 17:23:41

imp2021
Member
Registered: 2015-10-02
Posts: 31

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

tknomanzr wrote:

Do it this way:

sudo apt-get install nodejs-legacy		
sudo ln -s /usr/bin/nodejs /usr/sbin/node

Then , if you want the latest node (for security audits) do:

sudo npm install npm@latest -g

done that, the last line gives me:

 sudo: npm: command not found 

--

Also, if I may ask: Why the nodejs-legacy, but not the nodejs package?

Offline

#34 2018-06-28 21:03:02

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,029

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

Offline

#35 2018-07-05 12:44:47

alef
Member
Registered: 2015-12-30
Posts: 23

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

If you intend to do node.js development in the long run, you may want to use a version manager. This will allow you to switch node.js versions easily when working on different projects, and upgrade as new stable versions of node are released.

@D219 mentioned NVS, another option widely used in the industry and maintained is nvm. Also, simple to install, as long as you're ok to `curl something | bash` wink


Thinkpad X1Carbon 3rd Gen | BunsenLabs Deuterium
Thinkpad X250 | BunsenLabs Deuterium
Thinkpad X1Carbon 1st Edition | CrunchBang Waldorf r20121015
Thinkpad X240 | Wally <-- don't buy that & Eee-PC 1000H  |  CrunchBang Statler r20110207 Openbox

Offline

#36 2018-07-06 20:19:39

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,106
Website

Re: How Do I Safely and Effectively Install NodeJS on BL? [SOLVED]

Moderator, moving to GUI & Applications

Offline

Board footer

Powered by FluxBB