Page 1 of 1

NVM node instsallation npm problems

Posted: Sat Oct 24, 2020 1:41 am
by steeve
I have got a usb key persistent bionicpup64 8.0- wroks great very fast. But to my surprise I had to install VIM!! in many years of using Linux distros I have never had to install vim ..it normally should be a built in package.

Then I had to install node npm and nvm ..basic staples of web development.. I installed nvm and used it to install node LTS (now 12.19.10) and

Code: Select all

node -v
v12.19.10
so far so good but

Code: Select all

npm  -v 
bash: /usr/bin/npm: /usr/bin/nodejs: bad interpreter: No such file or directory

Anyone get node and npm working on Puppy 8 ? what did you use to install? PPM or sudo apt get?

Re: NVM node instsallation npm problems

Posted: Sat Oct 24, 2020 10:18 am
by steeve
I removed NVM completely and re installed it using wget as shown in the nvm github page

Code: Select all

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
This script adds config info in the .bashrc , now whenever I open a terminal :

Code: Select all

nvm is not compatible with the "PREFIX" environment variable: currently set to "/usr"
Run `unset PREFIX` to unset it.
PuppyLinux isn't Canonical Ubuntu which makes problems for configuring some PATH variables. I am using PupyLinux because of the speed but Im now leaning more and more to scrapping it and using Canonical Ubuntu (with xfce or other lightweight gui desktop for speed).

Re: NVM node instsallation npm problems

Posted: Sat Oct 24, 2020 11:37 am
by steeve
I solved this problem by adding this line to my .bashrc file (after reading about set/unset and env variables )

Code: Select all

export PREFIX=""

Re: NVM node instsallation npm problems

Posted: Sat Oct 24, 2020 1:10 pm
by rockedge
@steeve
I have nodejs and npm installed and working well....I made a set of instructions some place on how to set node up in Puppy Linux, I'll have to look around where it is!
I originally used it while working with Shinobi. I started with Nodejs in Xenial and mostly used the environment on Bionic Puppy's.

Basic method:
download Linux x64 binaries -> https://nodejs.org/en/download/
extract to /root/my-applications
sym link the contents of /root/my-applications/node-v12.19.0-linux-x64/bin to /root/my-applications/bin

in a terminal :

Code: Select all

npm -v
Screenshot.png
Screenshot.png (112.65 KiB) Viewed 1377 times

Re: NVM node instsallation npm problems

Posted: Sat Oct 24, 2020 6:13 pm
by steeve
Ok that's great you are around. Because I'm tooling up Puppy with apps like Tmux now and eventually other programmer related utilities and apps. (Jupyter notebook , Anaconda maybe and/or other goodies).

Puppy should have all this stuff pre installed.

EDIT: maybe a cool puppy project is a web development tooling package wiki and/or a computer science tooling wiki. Like the Debian Pure Blends.

Re: NVM node instsallation npm problems

Posted: Sun Oct 25, 2020 6:55 pm
by sc0ttman
You could use `nv`, instead of `nvm` .. It's a simpler script, which pollutes the shell environment much less, stops your prmpt getting slow

https://github.com/fredrb/nv

I use nv instead of nvm ... I'm happy with it - I rarely need to switch or add NodeJS versions anyway..

Also there is this more complex one, but I've never used it: https://github.com/nodenv/nodenv

Re: NVM node instsallation npm problems

Posted: Sun Oct 25, 2020 6:57 pm
by sc0ttman
steeve wrote: Sat Oct 24, 2020 6:13 pmBecause I'm tooling up Puppy with apps like Tmux
BTW - you could also look into mlterm - it supports tmux-like splitting of screens, and tabs, and lots of other cool stuff.
If that's of any interest...