Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Node.js & npm
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Wed Nov 23, 2011 1:20 am    Post subject: Node.js & npm Reply with quote

I am monitoring the etherpad-lite project and attempted to build the current high watermark. What I learned is that Gentoo's implementation of Node.js may be lacking. Here are the details:

https://github.com/Pita/etherpad-lite/issues/225#issuecomment-2843550

Upshot: looks like Node.js has a package manager, Node Package Manager "npm", that is not in Gentoo.

Code:
atom ~ # eix npm
No matches found.
atom ~ #


If you are working with Node.js, then here's the magic shell line to get up back into the running:
Code:
curl http://npmjs.org/install.sh | sh
Back to top
View user's profile Send private message
malern
Apprentice
Apprentice


Joined: 19 Oct 2006
Posts: 170

PostPosted: Wed Nov 23, 2011 3:14 pm    Post subject: Re: Node.js & npm Reply with quote

jlpoole wrote:
What I learned is that Gentoo's implementation of Node.js may be lacking.


NPM isn't an official part of Node.js, it's just a popular package manager for it. The Node.js ebuild shouldn't be lacking anything compared to the upstream package.

I've been doing a lot of nodejs dev recently and I find NPM is really limited compared to a more mature package management system like portage. I'm actually considering creating ebuilds for all the packages I need instead. It's a shame that whenever a new language/framework appears they feel the need to reinvent yet another incompatible packaging system.
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Wed Nov 23, 2011 5:25 pm    Post subject: Re: Node.js & npm Reply with quote

malern wrote:
jlpoole wrote:
What I learned is that Gentoo's implementation of Node.js may be lacking.


NPM isn't an official part of Node.js, it's just a popular package manager for it. The Node.js ebuild shouldn't be lacking anything compared to the upstream package.

I've been doing a lot of nodejs dev recently and I find NPM is really limited compared to a more mature package management system like portage. I'm actually considering creating ebuilds for all the packages I need instead. It's a shame that whenever a new language/framework appears they feel the need to reinvent yet another incompatible packaging system.


What package management system would you suggest to them? They might as well have the benefit of your experience on this matter. I'd plan on submitting this thread for their consideration.
Back to top
View user's profile Send private message
malern
Apprentice
Apprentice


Joined: 19 Oct 2006
Posts: 170

PostPosted: Fri Nov 25, 2011 6:06 pm    Post subject: Re: Node.js & npm Reply with quote

jlpoole wrote:
What package management system would you suggest to them? They might as well have the benefit of your experience on this matter. I'd plan on submitting this thread for their consideration.
To be honest I don't have any answers, I'd had a bad day trying to get npm to do what I wanted and needed to rant :). Incompatible packaging systems is a problem that has plagued linux forever and nobody seems to have come close to finding a solution yet.

I notice node.js v0.6.3 is out today and now includes npm as an official part of the package, so I guess they're pretty committed to that system now. Hopefully it'll mature quicker now it's the official way to install packages. I'd like to see them add support for optional dependencies. Obviously I'm rather biased but I'd love to see something along the same lines as gentoos USE flags.

The other thing that bugs me is it installs all dependencies into the node_modules subdir by default. So if you've got lots of apps you end up with lots of copies of the same libs all over the place. I'm guessing this is inspired by the MacOSX install system where a program and all it's libs are contained in the same directory. I'd rather see something along the lines of the traditional unix lib system where all libs are installed into a shared dir to reduce the redundancy and make it easier to upgrade them. npm does have a global dir option which solves this partially, but doesn't have any support for installing different versions of the same lib at the same time.

To be honest these are just minor gripes, and mostly just personal preference. If it was really causing me grief I'd pitch in and write some code to fix it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum