pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lang/npm accesses network while building?



Hello Benny,

Am 27.11.22 um 09:03 schrieb Benny Siegert:
Hi!

I got the following error when building lang/npm:

===> Building for npm-8.15.1
node bin/npm-cli.js run resetdeps

npm@8.15.1 resetdeps
bash scripts/resetdeps.sh

+ node . i --ignore-scripts --no-audit --no-fund
npm ERR! code EHOSTUNREACH
npm ERR! syscall connect
npm ERR! errno EHOSTUNREACH
npm ERR! request to https://registry.npmjs.org/tap/-/tap-16.3.0.tgz
failed, reason: connect EHOSTUNREACH 2606:4700::6810:1623:443 - Local
(:::62966)

npm ERR! A complete log of this run can be found in:
npm ERR!     /usr/obj/pkgsrc/lang/npm/work/.home/.npm/_logs/2022-11-27T07_58_29_489Z-debug-0.log
gmake: *** [Makefile:53: deps] Error 1
*** Error code 2

Should it be doing that? Access registry.npmjs.org, that is? Or am I
missing something?


the problem seems familiar to me. I can't speak for the pkgsrc community in general, but I think this uncontrolled reloading is bad. Normally in pkgsrc I can rely on the packages being built from the same sources over and over again, as long as the hashes match the ones in distinfo. This is no longer guaranteed here and opens the door for malicious code injection.

Nevertheless - unfortunately I also needed npm recently. The problem above came from the fact that the npm registry seems to preferentially resolve to an IPv6 host on the internet. My home network is not IPv6 all the way. The workaround then was to go to "prefer_ipv4" with ip6addrctl.

Kind regards
Matthias

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Home | Main Index | Thread Index | Old Index