dream2nix
dream2nix copied to clipboard
node project builds differently in build vs devshell
In https://github.com/fufexan/webcord-flake, after copying the flake.nix, flake.lock and dream2nix-packages to a local checkout of https://github.com/SpacingBat3/WebCord, running nix build .#webcord && ./result/bin/webcord will give an error and won't run. But after adding devShells.${system}.default = dream.devShells.webcord; to the flake outputs and running nix develop and inside the shell running npm run build && npm start it will run fine. The issue here seems to be that the result of the dream2nix build and the build inside a devshell is different. ls -l ./result/lib/node_modules/webcord/app (after building with nix) and ls -l app (after running the commands inside devshell) will be different.
I tried to reproduce that issue but could not. The build worked just fine for me. What error is it that you are geting? Maybe you could share the repo with the flake etc.
closing, as unable to reproduce. Please re-open with more details if it occurs again.