NVM node instsallation npm problems

Post here if you feel others can duplicate your so discovered "bug"

Moderator: Forum moderators

Post Reply
steeve
Posts: 28
Joined: Sun Sep 27, 2020 2:15 pm

NVM node instsallation npm problems

Post 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?
steeve
Posts: 28
Joined: Sun Sep 27, 2020 2:15 pm

Re: NVM node instsallation npm problems

Post 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).
steeve
Posts: 28
Joined: Sun Sep 27, 2020 2:15 pm

Re: NVM node instsallation npm problems

Post 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=""
User avatar
rockedge
Site Admin
Posts: 6571
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2779 times
Been thanked: 2650 times
Contact:

Re: NVM node instsallation npm problems

Post 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 1478 times
steeve
Posts: 28
Joined: Sun Sep 27, 2020 2:15 pm

Re: NVM node instsallation npm problems

Post 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.
User avatar
sc0ttman
Posts: 93
Joined: Sat Aug 22, 2020 3:55 pm
Has thanked: 4 times
Been thanked: 33 times

Re: NVM node instsallation npm problems

Post 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
User avatar
sc0ttman
Posts: 93
Joined: Sat Aug 22, 2020 3:55 pm
Has thanked: 4 times
Been thanked: 33 times

Re: NVM node instsallation npm problems

Post 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...
Post Reply

Return to “Bug Reports”