PF4Public / gentoo-overlay

Personal Gentoo overlay
80 stars 20 forks source link

app-editors/vscode: Error: Cannot find module 'node:worker_threads' #164

Closed witcheslive closed 2 years ago

witcheslive commented 2 years ago

for some reason, it is not pulling in worker_threads and the build is failing

>>> Compiling source in /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2 ...
[^[[90m17:33:43^[[39m] Using gulpfile ^[[35m/var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/gulpfile.js^[[39m
[^[[90m17:33:43^[[39m] Starting '^[[36mvscode-linux-x64-min^[[39m'...
[^[[90m17:33:43^[[39m] Starting ^[[36mclean-out-build^[[39m ...
[^[[90m17:33:43^[[39m] Finished ^[[36mclean-out-build^[[39m after ^[[35m1 ms^[[39m
[^[[90m17:33:43^[[39m] Starting ^[[36mbuild-web-node-paths^[[39m ...
[^[[90m17:33:43^[[39m] Finished ^[[36mbuild-web-node-paths^[[39m after ^[[35m2 ms^[[39m
[^[[90m17:33:43^[[39m] Starting ^[[36mcompile-build^[[39m ...
[^[[90m17:33:43^[[39m] '^[[36mvscode-linux-x64-min^[[39m' ^[[31merrored after^[[39m ^[[35m153 ms^[[39m
[^[[90m17:33:43^[[39m] Error: Cannot find module 'node:worker_threads'
Require stack:
- /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/build/lib/tsb/transpiler.js
- /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/build/lib/tsb/index.js
- /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/build/lib/compilation.js
- /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/build/gulpfile.js
- /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/gulpfile.js
- /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/node_modules/gulp-cli/lib/shared/require-or-import.js
- /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/node_modules/gulp-cli/index.js
- /var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:747:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/var/tmp/portage/app-editors/vscode-1.69.2/work/vscode-1.69.2/build/lib/tsb/transpiler.js:9:17)
    at Module._compile (internal/modules/cjs/loader.js:1085:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:791:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)

the output of emerge --info '=app-editors/vscode-1.69.2::pf4public'

Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* PUEL microsoft-edge -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=znver1 -O2"
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/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.0/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.0/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.0/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=znver1 -O2"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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="-march=znver1 -O2"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks 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="-march=znver1 -O2"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo rsync://rsync.gtlib.gatech.edu/gentoo https://gentoo.osuosl.org/ http://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ https://mirrors.rit.edu/gentoo/ http://mirrors.rit.edu/gentoo/ ftp://mirrors.rit.edu/gentoo/ rsync://mirrors.rit.edu/gentoo/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.cs.utah.edu/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j25"
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"
SHELL="/bin/bash"
USE="X acl amd64 bzip2 chromecast cjk cli consolekit crypt curl dbus dri dvd exif fdk fortran gdbm gnome-keyring gtk haptic hwaccel hwdb iconv imagemagick ipv6 jack jpeg jpeg2k libglvnd libsecret libtirpc luajit microdns minizip mng multilib ncurses nls nptl nvenc nvidia openmp pam pcre pdf png postscript pulseaudio python qt5 readline seccomp smp speex split-usr ssl svg tiff tools truetype udev udf unicode uvm v4l v4l2 vnc webcam webp wmf xattr xft xpm zlib" ABI_X86="64 32" ADA_TARGET="gnat_2020" 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 avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" CURL_SSL="nss" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

the output of emerge -pqv '=app-editors/vscode-1.69.2::pf4public'


[ebuild  N    ] app-editors/vscode-1.69.2  USE="build-online -badge-providers -electron-19 -insiders -liveshare -openvsx -substitute-urls" 

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.
 * ```

note that I had enabled the `build-online` use flag for this run to see if it works, it is the same result either way
witcheslive commented 2 years ago

I seem to have fixed this by updating node to the latest version. Is there a way for the ebuild to ensure it is using a compatible version of node?

PF4Public commented 2 years ago

Hmm… Interesting, I thought I've completely decoupled vscode from system node 🤔Turns out, not entirely. I'll look into it later.

PF4Public commented 2 years ago

Indeed there were some calls to system node. I hope, it is now properly disconnected from system node and uses solely electron's node from now on.