I believe this could be a transient error but I would still try to figure it out as it’s the first time I use this feature on a flake. Here’s my current flake.nix:
{
description = "Hello World";
inputs = {
};
outputs = { self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f:
nixpkgs.lib.genAttrs systems (system:
f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
git
uv
importNpmLock.hooks.linkNodeModulesHook
nodejs
];
};
npmDeps = pkgs.importNpmLock.buildNodeModules {
npmRoot = ./.;
inherit (pkgs) nodejs;
};
});
};
}
I have a ./node_modules folder installed and also have @vue/cli installed there. If I run nix develop, I get this error every time, even though everything seems to work as it should:
warning: Git tree '/Users/pocalypse/Develop/proletariat' is dirty
Executing linkNodeModulesHook
node:internal/fs/promises:953
const result = await PromisePrototypeThen(
^
Error: ENOENT: no such file or directory, scandir '/node_modules'
at async Object.readdir (node:internal/fs/promises:953:18)
at async main (/nix/store/4pfaf1vijsqqgs5l2l9fxjn2jp5l2s9k-link-node-modules.js:59:23) {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/node_modules'
}
Node.js v24.14.0
Finished executing linkNodeModulesShellHook
pocalypse:proletariat pocalypse$ vue
Usage: vue <command> [options]
I’d love your input if somebody has any idea how I can debug this further, thank you in advance!