-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hedgedoc does not build on master #176127
Comments
I encountered the same symptom while building Thanks to you tracking it down to the nodejs update, I found that the biggest change was an upgrade of the included npm version from 8.5-something to 8.10 or so. And for npm 8.6, there seems to be this matching issue: npm/cli#4769 Apparently, it now fails when the home-directory does not exist. And inside sandboxed nix builds, there is no home directory. I got the
|
Adding As this issue seems to concern pretty much all node packages which call npm manually during their |
This issue also affect the peertube service. It set it's home directory to the peertube derivation, and so, it doesn't start. @mohe2015 (or another peertube maintainer), you may be interested in this issue (not sure it's a good idea to ping the whole peertube maintainers maintainer team...) |
npm now fails if $HOME is not set, see #176127
This works for me as a temporary fix:
Should we commit a fix for hedgedoc while we are thinking about more general solutions? The responsible commit is a patch update of nodejs but this seems to do six minor updates for npm (see this and this). I think it might be interesting to know why the newer npm insist on having a home. strace shows several If it can access its home, it will create a
As this also breaks the Regarding a fix in nixpkgs: We can set
|
Currently not using NixOS so pinging @Izorkin |
Tried this fix on latest unstable, but it still fails to build. This is what I got from
|
@pinpox To me, it looks like your machine ran out of memory while building so it got killed |
Node.js 16.15.1 updated its vendored npm, which breaks sandboxed builds See: NixOS#176127 This reverts commit e6188b6.
Fix work PeerTube with nodejs 16.15.1 diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix
index e6b6aa273e7..40838e5807a 100644
--- a/nixos/modules/services/web-apps/peertube.nix
+++ b/nixos/modules/services/web-apps/peertube.nix
@@ -409,6 +409,7 @@ in {
password: '$(cat ${cfg.smtp.passwordFile})'
''}
EOF
+ mkdir /tmp/.npm
ln -sf ${cfg.package}/config/default.yaml /var/lib/peertube/config/default.yaml
ln -sf ${configFile} /var/lib/peertube/config/production.json
npm start
@@ -433,7 +434,7 @@ in {
RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" "AF_NETLINK" ];
MemoryDenyWriteExecute = false;
# System Call Filtering
- SystemCallFilter = [ ("~" + lib.concatStringsSep " " systemCallsList) "pipe" "pipe2" ];
+ SystemCallFilter = [ ("~" + lib.concatStringsSep " " systemCallsList) "@chown" "pipe" "pipe2" ];
} // cfgService;
};
diff --git a/pkgs/servers/peertube/default.nix b/pkgs/servers/peertube/default.nix
index 558c21c6cd1..8c107047af2 100644
--- a/pkgs/servers/peertube/default.nix
+++ b/pkgs/servers/peertube/default.nix
@@ -97,6 +97,7 @@ in stdenv.mkDerivation rec {
mkdir $out/client
mv ~/client/{dist,node_modules,package.json,yarn.lock} $out/client
mv ~/{config,scripts,support,CREDITS.md,FAQ.md,LICENSE,README.md,package.json,tsconfig.json,yarn.lock} $out
+ ln -s /tmp/.npm $out/.npm
'';
passthru.tests.peertube = nixosTests.peertube;
|
After that PR npm started to give an error of creating temporary files - npm/cli#4594 |
as mentioned in #175972
(in node_modules/sqlite3)
exits with code 243
responsible commit is e6188b6
The text was updated successfully, but these errors were encountered: