| 15 Dec 2023 |
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 |
avocadoom | warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/0rb9qgdsbkafx4s59jsa5lxhkhr5fsvv-darmstadt.ccc.de.drv^*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/g5n23k8ahzdfgw7s8l40iqmvy21li8cr-kndykrdjyqs5jn478q753lcncfvv2l4z-source
source root is kndykrdjyqs5jn478q753lcncfvv2l4z-source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
added 195 packages, and audited 196 packages in 2s
12 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 9.5.1 -> 10.2.5
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.5
npm notice Run npm install -g npm@10.2.5 to update!
npm notice
> build
> hugo
WARN config: languages.de.disabled: custom params on the language top level is deprecated and will be removed in a future release. Put the value below [languages.de.params]. See https://gohugo.io/content-management/multilingual/#changes-in-hugo-01120
Start building sites …
hugo v0.115.0+extended linux/amd64 BuildDate=unknown VendorInfo=nixpkgs
ERROR render of "page" failed: "/tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/layouts/_default/baseof.html:14:28": execute of template failed: template: _default/single.html:14:28: executing "_default/single.html" at <partial "scripts.html" .>: error calling partial: "/tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/layouts/partials/scripts.html:4:10": execute of template failed: template: partials/scripts.html:4:10: executing "partials/scripts.html" at <$main.Content>: error calling Content: BABEL: failed to transform "js/main.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/main.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-2696888417.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
ERROR BABEL: failed to transform "js/critical.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/critical.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-9938092.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
ERROR BABEL: failed to transform "js/calendar.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/calendar.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-45920551.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
ERROR BABEL: failed to transform "js/main.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/main.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-2696888417.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
Total in 1817 ms
Error: error building site: render: failed to render pages: render of "page" failed: "/tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/layouts/_default/baseof.html:13:8": execute of template failed: template: posts/single.html:13:8: executing "posts/single.html" at <partial "header.html" .>: error calling partial: "/tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/layouts/partials/header.html:43:20": execute of template failed: template: partials/header.html:43:20: executing "partials/header.html" at <$criticalScript.Content>: error calling Content: BABEL: failed to transform "js/critical.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/critical.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-9938092.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
| 01:40:59 |
avocadoom | In reply to @avocadoom:avocadoom.de
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/0rb9qgdsbkafx4s59jsa5lxhkhr5fsvv-darmstadt.ccc.de.drv^*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/g5n23k8ahzdfgw7s8l40iqmvy21li8cr-kndykrdjyqs5jn478q753lcncfvv2l4z-source
source root is kndykrdjyqs5jn478q753lcncfvv2l4z-source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
added 195 packages, and audited 196 packages in 2s
12 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 9.5.1 -> 10.2.5
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.5
npm notice Run npm install -g npm@10.2.5 to update!
npm notice
> build
> hugo
WARN config: languages.de.disabled: custom params on the language top level is deprecated and will be removed in a future release. Put the value below [languages.de.params]. See https://gohugo.io/content-management/multilingual/#changes-in-hugo-01120
Start building sites …
hugo v0.115.0+extended linux/amd64 BuildDate=unknown VendorInfo=nixpkgs
ERROR render of "page" failed: "/tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/layouts/_default/baseof.html:14:28": execute of template failed: template: _default/single.html:14:28: executing "_default/single.html" at <partial "scripts.html" .>: error calling partial: "/tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/layouts/partials/scripts.html:4:10": execute of template failed: template: partials/scripts.html:4:10: executing "partials/scripts.html" at <$main.Content>: error calling Content: BABEL: failed to transform "js/main.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/main.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-2696888417.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
ERROR BABEL: failed to transform "js/critical.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/critical.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-9938092.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
ERROR BABEL: failed to transform "js/calendar.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/calendar.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-45920551.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
ERROR BABEL: failed to transform "js/main.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/main.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-2696888417.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
Total in 1817 ms
Error: error building site: render: failed to render pages: render of "page" failed: "/tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/layouts/_default/baseof.html:13:8": execute of template failed: template: posts/single.html:13:8: executing "posts/single.html" at <partial "header.html" .>: error calling partial: "/tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/layouts/partials/header.html:43:20": execute of template failed: template: partials/header.html:43:20: executing "partials/header.html" at <$criticalScript.Content>: error calling Content: BABEL: failed to transform "js/critical.js" (text/javascript): npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
: failed to execute binary "npx" with args [--no-install babel --config-file /tmp/nix-build-darmstadt.ccc.de.drv-0/kndykrdjyqs5jn478q753lcncfvv2l4z-source/babel.config.js --filename=js/critical.js --out-file=/tmp/nix-build-darmstadt.ccc.de.drv-0/compileOut-9938092.js]: npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path /var/empty/.npm
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
Lily Foster: this is the whole build log | 01:41:16 |
Lily Foster | In reply to @avocadoom:avocadoom.de as stated, I already tried that, which resulted in the same behavior apologies, i saw you stated that and was commenting on that specifically | 01:41:33 |
avocadoom | In reply to @lily:lily.flowers apologies, i saw you stated that and was commenting on that specifically no problem :) | 01:42:09 |
avocadoom | From reading them, I guess hugo just cant find babel, which is weird, since it works in a nix shell following the exact same steps as in the build process | 01:45:15 |
avocadoom | * From reading the logs, I guess hugo just cant find babel, which is weird, since it works in a nix shell following the exact same steps as in the build process | 01:45:28 |
Lily Foster | In reply to @avocadoom:avocadoom.de From reading the logs, I guess hugo just cant find babel, which is weird, since it works in a nix shell following the exact same steps as in the build process i'm gonna make a wild guess that babel is trying to write to your home dir. what if you add a export HOME="$TMPDIR"? | 01:51:31 |
Lily Foster | oh actually. it's trying to run npx | 01:52:51 |
Lily Foster | but can't | 01:53:03 |
Lily Foster | maybe? | 01:53:06 |
avocadoom | In reply to @lily:lily.flowers i'm gonna make a wild guess that babel is trying to write to your home dir. what if you add a export HOME="$TMPDIR"? this doesn't seem to work | 01:53:26 |