Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 712068 - net-libs/nodejs-12.14.0: npm command fails with error: "primordials is not defined"
Summary: net-libs/nodejs-12.14.0: npm command fails with error: "primordials is not de...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-10 16:05 UTC by MickKi
Modified: 2020-11-09 13:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MickKi 2020-03-10 16:05:46 UTC
Invoking the npm command installed with package nodejs-12.14.0 fails with error: "primordials is not defined"

Reproducible: Always

Actual Results:  
I've updated nodejs and tried to run npm in a project directory as plain user - it fails like so:
====================================
$ /usr/bin/node /usr/bin/npm install
evalmachine.<anonymous>:27
const { Math, Object } = primordials;
                         ^

ReferenceError: primordials is not defined
    at evalmachine.<anonymous>:27:26
    at Object.<anonymous> (/usr/lib64/node_modules/npm/node_modules/fs-vacuum/node_modules/graceful-fs/fs.js:11:1)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/lib64/node_modules/npm/node_modules/fs-vacuum/node_modules/graceful-fs/graceful-fs.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
==============================================================


Trying to install gulp with npx instead of running directly npm also fails:

==========
$ npx gulp
Command failed: /usr/bin/node /usr/lib64/node_modules/npm/bin/npm-cli.js config get cache --parseable
evalmachine.<anonymous>:27
const { Math, Object } = primordials;
                         ^

ReferenceError: primordials is not defined
    at evalmachine.<anonymous>:27:26
    at Object.<anonymous> (/usr/lib64/node_modules/npm/node_modules/fs-vacuum/node_modules/graceful-fs/fs.js:11:1)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/lib64/node_modules/npm/node_modules/fs-vacuum/node_modules/graceful-fs/graceful-fs.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
==============================================================

I don't recall what I had to do in detail last time I ran npm some years ago, but errors like this were not evident.  Is this a bug?

I tried various workarounds re. graceful-fs.js mentioned in the interwebs and none worked.  In any case, if this is an incompatible dependency issue I would think this ought to be resolved as part of the ebuild?
-- 
Regards,
Mick
Comment 1 Jonas Stein gentoo-dev 2020-03-14 19:36:12 UTC
Please paste the emerge info as described on
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
Comment 2 MickKi 2020-03-17 12:24:06 UTC
(In reply to Jonas Stein from comment #1)
> Please paste the emerge info as described on
> https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket

Not sure it'll help, but here you go:

$ emerge --info net-libs/nodejs
Portage 2.3.89 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-9.2.0, glibc-2.29-r7, 4.19.97-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.97-gentoo-x86_64-AMD_A10-7850K_Radeon_R7,_12_Compute_Cores_4C+8G-with-gentoo-2.6
KiB Mem:    15397348 total,  14842916 free
KiB Swap:   17576956 total,  17576956 free
Timestamp of repository gentoo: Tue, 17 Mar 2020 06:45:01 +0000
Head commit of repository gentoo: ee5d657fbf3dfbf2d2f5a1b3ad143016fb255243
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo
dev-util/cmake:           3.14.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://10.10.10.101/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

brother-overlay
    location: /var/lib/layman/brother-overlay
    masters: gentoo
    priority: 50

local
    location: /usr/local/portage
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE AdobeFlash-11.x skype-4.0.0.7-r2"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://10.10.10.101:1024/ http://mirror.bytemark.co.uk/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.modulix.net/gentoo/ rsync://rsync.mirrorservice.org/distfiles.gentoo.org/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://www.mirrorservice.org/sites/distfiles.gentoo.org/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB en"
MAKEOPTS="-j5 -l4.8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups cxx dbus declarative dri dts dvd dvdr elogind emboss encode exif flac fortran gdbm gif glamor gpm iconv icu ipv6 jpeg kde kipi kwallet lcms ldap libnotify libtirpc mad mmx mmxext mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds qml qt5 r600-llvm-compiler rar readline sdl seccomp semantic-desktop spell split-usr sse sse2 sse4_2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" L10N="en-GB en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86 AMDGPU" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" SANE_BACKENDS="canon canon630u genesys plustek" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-libs/nodejs-12.14.0::gentoo was built with the following:
USE="icu inspector npm snapshot ssl -debug -doc -systemtap -test" ABI_X86="(64)" CPU_FLAGS_X86="sse2"
FEATURES="fail-clean userfetch binpkg-dostrip unknown-features-warn sandbox parallel-fetch unmerge-logs unmerge-orphans usersync config-protect-if-modified news binpkg-docompress binpkg-logs distlocks network-sandbox ipc-sandbox preserve-libs strict assume-digests usersandbox sfperms protect-owned pid-sandbox fixlafiles qa-unresolved-soname-deps userpriv multilib-strict merge-sync xattr ebuild-locks"
Comment 3 Marek Szuba archtester gentoo-dev 2020-11-09 13:06:59 UTC
Closed due to inactivity + the affected version having been removed from the tree, please reopen with updated information, if this is still a problem.