[Pkg-javascript-devel] packaging node applications in Debian

Jérémy Lal jerry at edagames.com
Mon Oct 3 20:10:16 UTC 2011


On 03/10/2011 21:09, Florian Brandes wrote:
> Hello,
> 
> my name is Florian Brandes and I am trying to debianize a node package
> for Ubuntu. (See: https://bugs.launchpad.net/ubuntu/+bug/861219 )
> The program I try to pack is called forever and is a simple script, but
> issuing a "sudo npm install forever -g" it does compile the node module
> "daemon" (also, see: http://paste.ubuntuusers.de/403177/ ) ("daemon" is
> a dependency of forever)
> 
> I downloaded the source code (in a folder called forever-0.6.7) , did a
> "npm pack" and "sudo npm install forever-0.6.7.tgz -g" within and it
> works and installs without problem, when connected to the Internet. When
> connection to the Internet is disabled, it cannot compile and dies with
> a "npm ERR! error installing forever at 0.6.7 Error: ECONNREFUSED, Could
> not contact DNS servers"
> 
> How can I build the package without an Internet connection? I ask,
> because the build system in Ubuntu builds in a separate, virtual,
> no-network-environment and fails.

You're supposed to use "forever" original tarball, not a pack made by npm.
Do not try to do things like "npm install" in debian/rules or debian/postinst:
npm is a nodejs development tool, not a debian packaging tool.
Also consider packaging "daemon" before, since it depends on it.
If you need help doing that, you can find examples and inspiration in already
existing libnode-* /debian/ packages.

Good luck.

Jérémy Lal



More information about the Pkg-javascript-devel mailing list