Package: npm
Version: 1.4.21+ds-3
Severity: normal
Tags: upstream

Got hit again by
https://github.com/npm/npm/issues/533

I'm sharing it here so other users can find a workaround.

`npm install npm -g` will correctly install latest version of npm in
/usr/local (provided current user is member of staff group).

Unfortunately, /usr/local/bin/npm will look for npmrc in the following places:
/usr/etc/npmrc, /usr/local/lib/node_modules/npm/npmrc...
but where we'd like it to look for:
/etc/npmrc
/usr/local/etc/npmrc
/usr/share/npm/npmrc (this is the one from the debian package)

It is a problem because *npm loses its /usr/local prefix*, so future
`npm install -g xxx`
will try to install into /usr/lib.

Workaround: after `npm install npm -g`, copy or symlink /usr/share/npm/npmrc to
/usr/local/lib/node_modules/npm/npmrc.

Jérémy.

_______________________________________________
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to