| 13 Dec 2023 |
hexa | zigbee2mqtt> npm ERR! code 1
zigbee2mqtt> npm ERR! path /build/source/node_modules/unix-dgram
zigbee2mqtt> npm ERR! command failed
zigbee2mqtt> npm ERR! command sh -c node-gyp rebuild
zigbee2mqtt> npm ERR! make: Entering directory '/build/source/node_modules/unix-dgram/build'
zigbee2mqtt> npm ERR! CXX(target) Release/obj.target/unix_dgram/src/unix_dgram.o
zigbee2mqtt> npm ERR! make: Leaving directory '/build/source/node_modules/unix-dgram/build'
zigbee2mqtt> npm ERR! gyp info it worked if it ends with ok
zigbee2mqtt> npm ERR! gyp info using node-gyp@10.0.1
zigbee2mqtt> npm ERR! gyp info using node@20.10.0 | linux | x64
zigbee2mqtt> npm ERR! gyp info find Python using Python version 3.11.6 found at "/nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/bin/python3"
zigbee2mqtt> npm ERR! gyp WARN read config.gypi ENOENT: no such file or directory, open '/nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source/include/node/config.gypi'
zigbee2mqtt> npm ERR! gyp info spawn /nix/store/5k91mg4qjylxbfvrv748smfh51ppjq0g-python3-3.11.6/bin/python3
zigbee2mqtt> npm ERR! gyp info spawn args [
zigbee2mqtt> npm ERR! gyp info spawn args '/nix/store/yc5bicc5zs5czjp5q5aygz79km84rmd4-nodejs-20.10.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
zigbee2mqtt> npm ERR! gyp info spawn args 'binding.gyp',
zigbee2mqtt> npm ERR! gyp info spawn args '-f',
zigbee2mqtt> npm ERR! gyp info spawn args 'make',
zigbee2mqtt> npm ERR! gyp info spawn args '-I',
zigbee2mqtt> npm ERR! gyp info spawn args '/build/source/node_modules/unix-dgram/build/config.gypi',
zigbee2mqtt> npm ERR! gyp info spawn args '-I',
zigbee2mqtt> npm ERR! gyp info spawn args '/nix/store/yc5bicc5zs5czjp5q5aygz79km84rmd4-nodejs-20.10.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
zigbee2mqtt> npm ERR! gyp info spawn args '-I',
zigbee2mqtt> npm ERR! gyp info spawn args '/nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source/common.gypi',
zigbee2mqtt> npm ERR! gyp info spawn args '-Dlibrary=shared_library',
zigbee2mqtt> npm ERR! gyp info spawn args '-Dvisibility=default',
zigbee2mqtt> npm ERR! gyp info spawn args '-Dnode_root_dir=/nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source',
zigbee2mqtt> npm ERR! gyp info spawn args '-Dnode_gyp_dir=/nix/store/yc5bicc5zs5czjp5q5aygz79km84rmd4-nodejs-20.10.0/lib/node_modules/npm/node_modules/node-gyp',
zigbee2mqtt> npm ERR! gyp info spawn args '-Dnode_lib_file=/nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source/$(Configuration)/node.lib',
zigbee2mqtt> npm ERR! gyp info spawn args '-Dmodule_root_dir=/build/source/node_modules/unix-dgram',
zigbee2mqtt> npm ERR! gyp info spawn args '-Dnode_engine=v8',
zigbee2mqtt> npm ERR! gyp info spawn args '--depth=.',
zigbee2mqtt> npm ERR! gyp info spawn args '--no-parallel',
zigbee2mqtt> npm ERR! gyp info spawn args '--generator-output',
zigbee2mqtt> npm ERR! gyp info spawn args 'build',
zigbee2mqtt> npm ERR! gyp info spawn args '-Goutput_dir=.'
zigbee2mqtt> npm ERR! gyp info spawn args ]
zigbee2mqtt> npm ERR! gyp info spawn make
zigbee2mqtt> npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
zigbee2mqtt> npm ERR! In file included from ../../nan/nan.h:180,
zigbee2mqtt> npm ERR! from ../src/unix_dgram.cc:5:
zigbee2mqtt> npm ERR! ../../nan/nan_callbacks.h:55:23: error: 'AccessorSignature' is not a member of 'v8'
zigbee2mqtt> npm ERR! 55 | typedef v8::Local<v8::AccessorSignature> Sig;
zigbee2mqtt> npm ERR! | ^~~~~~~~~~~~~~~~~
zigbee2mqtt> npm ERR! ../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid
zigbee2mqtt> npm ERR! 55 | typedef v8::Local<v8::AccessorSignature> Sig;
zigbee2mqtt> npm ERR! | ^
zigbee2mqtt> npm ERR! ../../nan/nan.h: In function 'bool Nan::IdleNotification(int)':
zigbee2mqtt> npm ERR! ../../nan/nan.h:686:63: warning: 'bool v8::Isolate::IdleNotificationDeadline(double)' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
zigbee2mqtt> npm ERR! 686 | return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
zigbee2mqtt> npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
zigbee2mqtt> npm ERR! 687 | idle_time_in_ms * 0.001);
zigbee2mqtt> npm ERR! | ~~~~~~~~~~~~~~~~~~~~~~~~
zigbee2mqtt> npm ERR! In file included from /nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source/deps/v8/include/v8-initialization.h:13,
zigbee2mqtt> npm ERR! from /nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source/deps/v8/include/v8.h:34,
zigbee2mqtt> npm ERR! from /nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source/src/node.h:73,
zigbee2mqtt> npm ERR! from ../../nan/nan.h:60:
zigbee2mqtt> npm ERR! /nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source/deps/v8/include/v8-isolate.h:1293:8: note: declared here
zigbee2mqtt> npm ERR! 1293 | bool IdleNotificationDeadline(double deadline_in_seconds);
zigbee2mqtt> npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~
zigbee2mqtt> npm ERR! ../src/unix_dgram.cc: At global scope:
zigbee2mqtt> npm ERR! /nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source/src/node.h:1172:7: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
zigbee2mqtt> npm ERR! 1172 | (node::addon_register_func) (regfunc), \
zigbee2mqtt> npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
zigbee2mqtt> npm ERR! /nix/store/kik2nnknanp1l131ch098cqv4xb4ahas-nodejs-20.10.0-source/src/node.h:1206:3: note: in expansion of macro 'NODE_MODULE_X'
zigbee2mqtt> npm ERR! 1206 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
zigbee2mqtt> npm ERR! | ^~~~~~~~~~~~~
zigbee2mqtt> npm ERR! ../src/unix_dgram.cc:404:1: note: in expansion of macro 'NODE_MODULE'
zigbee2mqtt> npm ERR! 404 | NODE_MODULE(unix_dgram, Initialize)
zigbee2mqtt> npm ERR! | ^~~~~~~~~~~
zigbee2mqtt> npm ERR! make: *** [unix_dgram.target.mk:109: Release/obj.target/unix_dgram/src/unix_dgram.o] Error 1
zigbee2mqtt> npm ERR! gyp ERR! build error
zigbee2mqtt> npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
zigbee2mqtt> npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/nix/store/yc5bicc5zs5czjp5q5aygz79km84rmd4-nodejs-20.10.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
zigbee2mqtt> npm ERR! gyp ERR! System Linux 6.1.20
zigbee2mqtt> npm ERR! gyp ERR! command "/nix/store/yc5bicc5zs5czjp5q5aygz79km84rmd4-nodejs-20.10.0/bin/node" "/nix/store/yc5bicc5zs5czjp5q5aygz79km84rmd4-nodejs-20.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
zigbee2mqtt> npm ERR! gyp ERR! cwd /build/source/node_modules/unix-dgram
zigbee2mqtt> npm ERR! gyp ERR! node -v v20.10.0
zigbee2mqtt> npm ERR! gyp ERR! node-gyp -v v10.0.1
zigbee2mqtt> npm ERR! gyp ERR! not ok
zigbee2mqtt>
zigbee2mqtt> npm ERR! Log files were not written due to an error writing to the directory: /nix/store/pdf6vcq0xf1hp7gfcfw5sixnnylsvxgl-zigbee2mqtt-1.34.0-npm-deps/_logs
zigbee2mqtt> npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
zigbee2mqtt>
| 18:46:51 |
hexa | send help | 18:46:55 |
Lily Foster | In reply to @hexa:lossy.network send help help is being dispatched now | 18:53:16 |
Lily Foster | is it failing in nixpkgs now? looks like it's probably related to nodejs_20 bump? | 18:53:31 |
hexa | master | 18:54:39 |
hexa | quite likely, did that happen in the last staging cycle? | 18:54:54 |
Lily Foster | In reply to @hexa:lossy.network quite likely, did that happen in the last staging cycle? yep | 18:56:27 |
Lily Foster | open-stage-control is busted too, which i noticed yesterdaty | 18:56:37 |
Lily Foster | * open-stage-control is busted too, which i noticed yesterday | 18:56:40 |
Lily Foster | yeah this is enough to fix it hexa:
diff --git a/pkgs/servers/zigbee2mqtt/default.nix b/pkgs/servers/zigbee2mqtt/default.nix
index 6b655c63cd86..a215b7d771b8 100644
--- a/pkgs/servers/zigbee2mqtt/default.nix
+++ b/pkgs/servers/zigbee2mqtt/default.nix
@@ -1,7 +1,7 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
-, python3
+, nodejs_18
, nixosTests
, nix-update-script
}:
@@ -19,9 +19,7 @@ buildNpmPackage rec {
npmDepsHash = "sha256-MXTKZNERxryt7L42dHxKx7XfXByNQ67oU+4FKTd0u4U=";
- nativeBuildInputs = [
- python3
- ];
+ nodejs = nodejs_18;
passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt;
passthru.updateScript = nix-update-script { };
| 18:59:42 |
hexa | mentioning me with a patch makes the patch look bloody red | 19:02:03 |
hexa |  Download image.png | 19:02:25 |
hexa | send a PR? | 19:04:37 |
hexa | * send the PR? | 19:04:41 |
hexa | it's your change after all | 19:04:48 |
Lily Foster | In reply to @hexa:lossy.network it's your change after all i mean, sure. give me a bit and i'll send it when i'm back at my laptop. i got a few other nodejs_20 fallout things i was gonna PR when i got back to my desk too | 19:05:52 |
hexa | does the builder provide python by itself? | 19:05:55 |
Lily Foster | In reply to @hexa:lossy.network does the builder provide python by itself? it does now, yes | 19:06:01 |
hexa | ok, cool | 19:06:05 |
hexa | lgtm | 19:06:07 |
Lily Foster | and xcbuild on darwin | 19:06:09 |
Lily Foster | since those were both in build closure already anyway and like they're both needed for basically any node-gyp packages | 19:06:34 |
Lily Foster | In reply to @hexa:lossy.network send the PR? apologies for taking a bit. here's PR: https://github.com/NixOS/nixpkgs/pull/274063 | 20:43:07 |
| 15 Dec 2023 |
| avocadoom joined the room. | 01:20:02 |
avocadoom | Hi, I currently try to package a Hugo site which uses BabelJS to transpile the JS to a more commonly compatible format. While having success with other Javascript frontend frameworks, I always get the following error while trying to build the site:
last 10 log lines:
> npm ERR! errno -1
> npm ERR!
> npm ERR! Your cache folder contains root-owned files, due to a bug in
> npm ERR! previous versions of npm which has since been addressed.
> npm ERR!
> npm ERR! To permanently fix this problem, please run:
> npm ERR! sudo chown -R 30001:30000 "/var/empty/.npm"
>
> npm ERR! Log files were not written due to an error writing to the directory: /var/empty/.npm/_logs
> npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
Note, that this does not happen when building in a nix shell. This is how my current flake looks like.
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.npmlock2nix = {
url = "github:nix-community/npmlock2nix";
flake = false;
};
outputs = { self, nixpkgs, npmlock2nix }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs {
inherit system;
overlays = [
(self: super: {
nodejs = super.nodejs-18_x;
pnpm = super.nodePackages.pnpm;
npmlock2nix = super.callPackage npmlock2nix { };
})
];
};
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs-18_x
hugo
curl
html-proofer
just
nodePackages."@babel/cli"
];
};
});
packages = forEachSupportedSystem ({ pkgs }: {
default = pkgs.stdenv.mkDerivation rec {
__noChroot = true;
name = "darmstadt.ccc.de";
src = ./.;
nativeBuildInputs = [
pkgs.hugo
pkgs.nodejs
];
buildPhase = ''
export HOME=./
npm install
npm run build
'';
installPhase = ''
mkdir -p $out/bin
cp -r $src/downloads $out/
'';
};
});
};
}
Dont be bothered by some imports, they are just the result of some tests. The sources can be found here: https://git.darmstadt.ccc.de/cda/chaos-darmstadt.de/-/tree/nix-flakes
I really hop to find some suggestions here since I spent the whole evening googling for similar problems without success.
thx in advance :)
| 01:36:33 |
avocadoom | From watching the build output, this problem occurs when executing the hugo build. This occurs installing the npm modules inside the buildscript as well as using npmlock2nix or buildNpmModule | 01:37:35 |
Lily Foster | In reply to @avocadoom:avocadoom.de
Hi, I currently try to package a Hugo site which uses BabelJS to transpile the JS to a more commonly compatible format. While having success with other Javascript frontend frameworks, I always get the following error while trying to build the site:
last 10 log lines:
> npm ERR! errno -1
> npm ERR!
> npm ERR! Your cache folder contains root-owned files, due to a bug in
> npm ERR! previous versions of npm which has since been addressed.
> npm ERR!
> npm ERR! To permanently fix this problem, please run:
> npm ERR! sudo chown -R 30001:30000 "/var/empty/.npm"
>
> npm ERR! Log files were not written due to an error writing to the directory: /var/empty/.npm/_logs
> npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
Note, that this does not happen when building in a nix shell. This is how my current flake looks like.
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.npmlock2nix = {
url = "github:nix-community/npmlock2nix";
flake = false;
};
outputs = { self, nixpkgs, npmlock2nix }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs {
inherit system;
overlays = [
(self: super: {
nodejs = super.nodejs-18_x;
pnpm = super.nodePackages.pnpm;
npmlock2nix = super.callPackage npmlock2nix { };
})
];
};
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs-18_x
hugo
curl
html-proofer
just
nodePackages."@babel/cli"
];
};
});
packages = forEachSupportedSystem ({ pkgs }: {
default = pkgs.stdenv.mkDerivation rec {
__noChroot = true;
name = "darmstadt.ccc.de";
src = ./.;
nativeBuildInputs = [
pkgs.hugo
pkgs.nodejs
];
buildPhase = ''
export HOME=./
npm install
npm run build
'';
installPhase = ''
mkdir -p $out/bin
cp -r $src/downloads $out/
'';
};
});
};
}
Dont be bothered by some imports, they are just the result of some tests. The sources can be found here: https://git.darmstadt.ccc.de/cda/chaos-darmstadt.de/-/tree/nix-flakes
I really hop to find some suggestions here since I spent the whole evening googling for similar problems without success.
thx in advance :)
that error isn't the real one. that is just npm trying to log the errors above it and failing to. can you share the whole build log? | 01:39:12 |
avocadoom | Redacted or Malformed Event | 01:40:21 |
Lily Foster | In reply to @avocadoom:avocadoom.de
Hi, I currently try to package a Hugo site which uses BabelJS to transpile the JS to a more commonly compatible format. While having success with other Javascript frontend frameworks, I always get the following error while trying to build the site:
last 10 log lines:
> npm ERR! errno -1
> npm ERR!
> npm ERR! Your cache folder contains root-owned files, due to a bug in
> npm ERR! previous versions of npm which has since been addressed.
> npm ERR!
> npm ERR! To permanently fix this problem, please run:
> npm ERR! sudo chown -R 30001:30000 "/var/empty/.npm"
>
> npm ERR! Log files were not written due to an error writing to the directory: /var/empty/.npm/_logs
> npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
Note, that this does not happen when building in a nix shell. This is how my current flake looks like.
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.npmlock2nix = {
url = "github:nix-community/npmlock2nix";
flake = false;
};
outputs = { self, nixpkgs, npmlock2nix }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs {
inherit system;
overlays = [
(self: super: {
nodejs = super.nodejs-18_x;
pnpm = super.nodePackages.pnpm;
npmlock2nix = super.callPackage npmlock2nix { };
})
];
};
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs-18_x
hugo
curl
html-proofer
just
nodePackages."@babel/cli"
];
};
});
packages = forEachSupportedSystem ({ pkgs }: {
default = pkgs.stdenv.mkDerivation rec {
__noChroot = true;
name = "darmstadt.ccc.de";
src = ./.;
nativeBuildInputs = [
pkgs.hugo
pkgs.nodejs
];
buildPhase = ''
export HOME=./
npm install
npm run build
'';
installPhase = ''
mkdir -p $out/bin
cp -r $src/downloads $out/
'';
};
});
};
}
Dont be bothered by some imports, they are just the result of some tests. The sources can be found here: https://git.darmstadt.ccc.de/cda/chaos-darmstadt.de/-/tree/nix-flakes
I really hop to find some suggestions here since I spent the whole evening googling for similar problems without success.
thx in advance :)
oh wait you're not using an npm builder that'll take care of setting up npm enough that running npm install could actually work... hmm... | 01:40:21 |
avocadoom | In reply to @lily:lily.flowers oh wait you're not using an npm builder that'll take care of setting up npm enough that running npm install could actually work... hmm... as stated, I already tried that, which resulted in the same behavior | 01:40:53 |