Created attachment 597126 [details] build.log [32;01m * [39;49;00mPackage: net-libs/nodejs-13.1.0 [32;01m * [39;49;00mRepository: gentoo [32;01m * [39;49;00mMaintainer: jer@gentoo.org [32;01m * [39;49;00mUSE: abi_x86_64 amd64 cpu_flags_x86_sse2 elibc_glibc icu kernel_linux npm snapshot ssl userland_GNU [32;01m * [39;49;00mFEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Unpacking node-v13.1.0.tar.xz to /var/tmp/portage/net-libs/nodejs-13.1.0/work >>> Source unpacked in /var/tmp/portage/net-libs/nodejs-13.1.0/work >>> Preparing source in /var/tmp/portage/net-libs/nodejs-13.1.0/work/node-v13.1.0 ... /usr/bin/python3.7 tools/install.py install '/var/tmp/portage/net-libs/nodejs-13.1.0/image' '/usr' [31;01m*[0m [31;01mACCESS DENIED[0m: mkdir: /home/xvilka/.node_modules Error: EACCES: permission denied, mkdir '/home/xvilka/.node_modules' TypeError: Cannot read property 'get' of undefined at errorMessage (/var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/lib/utils/error-message.js:38:39) at errorHandler (/var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/lib/utils/error-handler.js:201:13) at /var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/bin/npm-cli.js:78:20 at cb (/var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/lib/npm.js:225:22) at /var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/lib/npm.js:263:24 at /var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/lib/config/core.js:81:7 at Array.forEach (<anonymous>) at /var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/lib/config/core.js:80:13 at f (/var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/node_modules/once/once.js:25:25) at afterExtras (/var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/lib/config/core.js:172:20) /var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/npm/lib/utils/error-handler.js:97 var doExit = npm.config.loaded ? npm.config.get('_exit') : true ^ TypeError: Cannot read property 'loaded' of undefined at exit (/var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/[4mnpm[24m/lib/utils/error-handler.js:97:27) at process.errorHandler (/var/tmp/portage/net-libs/nodejs-13.1.0/image/usr/lib64/node_modules/[4mnpm[24m/lib/utils/error-handler.js:216:3) [90m at process.emit (events.js:210:5)[39m [90m at process._fatalException (internal/process/execution.js:150:25)[39m >>> Completed installing net-libs/nodejs-13.1.0 into /var/tmp/portage/net-libs/nodejs-13.1.0/image [32;01m*[0m Final size of build directory: 571292 KiB (557.9 MiB) [32;01m*[0m Final size of installed tree: 49228 KiB ( 48.0 MiB) [31;01m*[0m --------------------------- ACCESS VIOLATION SUMMARY --------------------------- [31;01m*[0m LOG FILE: "/var/log/sandbox/sandbox-4.log" [31;01m*[0m VERSION 1.0 FORMAT: F - Function called FORMAT: S - Access Status FORMAT: P - Path as passed to function FORMAT: A - Absolute Path (not canonical) FORMAT: R - Canonical Path FORMAT: C - Command Line F: mkdir S: deny P: /home/xvilka/.node_modules A: /home/xvilka/.node_modules R: /home/xvilka/.node_modules C: npm [31;01m*[0m --------------------------------------------------------------------------------
Created attachment 597128 [details] emerge --info output
Does this help? --- a/nodejs-13.1.0.ebuild +++ b/nodejs-13.1.0.ebuild @@ -131,6 +131,7 @@ src_install() { local LIBDIR="${ED}/usr/$(get_libdir)" + local HOME="${T}" default pax-mark -m "${ED}"/usr/bin/node
(In reply to Jeroen Roovers from comment #2) > Does this help? > > > --- a/nodejs-13.1.0.ebuild > +++ b/nodejs-13.1.0.ebuild > @@ -131,6 +131,7 @@ > > src_install() { > local LIBDIR="${ED}/usr/$(get_libdir)" > + local HOME="${T}" > default > > pax-mark -m "${ED}"/usr/bin/node No, it didn't help
Still the same error with 13.6.0 version
(In reply to Anton Kochkov from comment #0) > F: mkdir > S: deny > P: /home/xvilka/.node_modules > A: /home/xvilka/.node_modules > R: /home/xvilka/.node_modules > C: npm Can you please attach the environment file?
Created attachment 603100 [details] environment Here you go - attached a gzipped environment file for nodejs-13.6.0
Still a problem for 13.8.0 version too.
Still a problem for 13.11.0 version.
Any ideas how to workaround this? NodeJS prevents me from updating my system and this bug is still present on nodejs-13.12.0
Disabled usersandbox for this package, it works with FEATURES="-usersandbox". Would be nice to get it fixed in the package eventually.
(In reply to Anton Kochkov from comment #6) > Created attachment 603100 [details] > environment > > Here you go - attached a gzipped environment file for nodejs-13.6.0 Thanks. Looks like there is nothing of value in there. Do you use sudo to run emerge as root, or do you "become" root and then run emerge from the root shell?
(In reply to Jeroen Roovers from comment #11) > (In reply to Anton Kochkov from comment #6) > > Created attachment 603100 [details] > > environment > > > > Here you go - attached a gzipped environment file for nodejs-13.6.0 > > Thanks. Looks like there is nothing of value in there. Having said that: declare -x npm_config_prefix="/home/xvilka/.node_modules" What could have set that? Does it help to `unset npm_config_prefix` in the ebuild?
I run it under "su", with the current directory "/home/xvilka" the "npm_config_modules" variables inherited from the "xvilka" user environment, but probably ebuild should ignore that variable for obvious reasons. If I unset it before merging - it builds fine, indeed.
Closing due to inactivity, please reopen with updated information if this is still a problem.