[Pkg-javascript-devel] Resolving "pure" javascript libraries from NodeJS

David Paleino dapal at debian.org
Sun Nov 6 21:17:05 UTC 2011


On Sun, 6 Nov 2011 22:03:33 +0100, David Paleino wrote:

> It seems like the package is asking for "wax", which is a
> pure-javascript library, to be used from a web browser, even though it is
> available from npmjs.org. I packaged (correctly, I hope) libjs-wax, but this
> code horribly fails in Node:
> 
> > require.resolve('wax/wax.mm.min.js')
> Error: Cannot find module 'wax/wax.mm.min.js'
>     at Function._resolveFilename (module.js:326:11)
>     at Function.resolve (module.js:359:19)
>     at [object Context]:1:9
>     at Interface.<anonymous> (repl.js:179:22)
>     at Interface.emit (events.js:64:17)
>     at Interface._onLine (readline.js:153:10)
>     at Interface._line (readline.js:408:8)
>     at Interface._ttyWrite (readline.js:585:14)
>     at ReadStream.<anonymous> (readline.js:73:12)
>     at ReadStream.emit (events.js:81:20)

# ln -s /usr/share/javascript/wax /usr/lib/nodejs/

makes it work.

Obviously it's the worst solution I could think at. And the only one too :)

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20111106/ac8fdf65/attachment.pgp>


More information about the Pkg-javascript-devel mailing list