[aur-general] PSA: nodejs projects in AUR - npm install --user root

eye at eyenx.ch eye at eyenx.ch
Wed Apr 14 11:38:34 UTC 2021


Hi, correct, had to change some of my PKGs to, got the memo from here[1]

[1] https://bugs.archlinux.org/task/70134

Toni

On 04/14 13:01, Damjan Georgievski via aur-general wrote:
> There are a lot of packages in AUR that use something like:
> 
>     npm install -g --user root --cache "${srcdir}/npm-cache" --prefix
> "$pkgdir/usr" "$srcdir/$_npmname-$pkgver.tgz"
> 
> to install and package a nodejs project. I guess at some point in time
> `--user root` worked for NPM but nowadays, npm behaves like this:
> 1) it silently ignores the `--user` option
> 2) installs the NPM package root (before installing the wanted .tgz)
>     https://www.npmjs.com/package/root
> 
> I guess `--user root` worked in some version of NPM but at some point
> npm decided to remove the option and not error on its use (what can I
> say).
> 
> So, the recommendation is to remove all uses of `--user root` in PKGBUILD.
> 
> ps.
> can someone run a grep -r -- "--user root" on the whole of AUR?
> 
> -- 
> damjan


More information about the aur-general mailing list