Replit in a crash loop due to a Nix Error

Question:
Hi, my name is Alex and I am collaborating on a project called Tungsten. A user in our dev team attempted to update Nix, and now the Repl won’t even start
Repl link:
Tungsten

code snippet

nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/trivial.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/lists.nix'
evaluating file '/nix/store/qv8ilmw19rf0vng64qp86mb18kkr6h3z-nixpkgs-stable-23_05-23.05.tar.gz/nixpkgs-stable-23_05/overlay.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/pkgs/stdenv/booter.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/pkgs/stdenv/default.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/systems/default.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/attrsets.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/systems/inspect.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/systems/architectures.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/systems/parse.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/strings.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/types.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/systems/platforms.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/modules.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/pkgs/top-level/config.nix'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/lib/options.nix'
evaluating file '/home/runner/.config/nixpkgs/config.nix'
error: syntax error, unexpected end of file, at /home/runner/.config/nixpkgs/config.nix:1:1
(use '--show-trace' to show detailed location information)

panic: exec: "node": executable file not found in $PATH

goroutine 1 [running]:
main.Execute(0xc000138000)
    github.com/replit/prybar/languages/nodejs/main.go:40 +0x2c9
main.main()
    github.com/replit/prybar/languages/nodejs/generated_launch.go:7 +0x2a
repl process died unexpectedly: exit status 2

Giving up. You can try again by clicking Run. You may need to fix the [interpreter] definition in the .replit file first.
2 Likes

I forgot to mention that the shell is broken as well, and gives this error:

Detected change in environment, reloading shell...
nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
instantiated 'install-package' -> '/nix/store/gxy8nggrpq81n0qv0d9wj8m1r046wyfk-install-package.drv'
instantiated 'reconstructpackagelock.js' -> '/nix/store/yirjxpaxgvb6xmayj66lprz2sg9ma238-reconstructpackagelock.js.drv'
instantiated 'addintegrityfields.js' -> '/nix/store/fx75kz675g126pw517a4w1g6d278lmw8-addintegrityfields.js.drv'
instantiated 'node-sources' -> '/nix/store/f56qizxz06bcgzyv6dd4iz4js3pjll4d-node-sources.drv'
instantiated 'linkbins.js' -> '/nix/store/q4f1cwzbcplbpm2yc08bxdkdbly0534a-linkbins.js.drv'
instantiated 'pinpointDependencies.js' -> '/nix/store/lmb7vzpyh5p0lxh7j4khs73dpyjzfp5l-pinpointDependencies.js.drv'
copied source '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/pkgs/servers/x11/xorg/builder.sh' -> '/nix/store/4jwwba2k3lskklfmpd0gr8xjrz1g7wjw-builder.sh'
instantiated 'lndir-1.0.4.tar.xz' -> '/nix/store/x6klx3ic77z9fh4mkmgj20iagw7r7w3r-lndir-1.0.4.tar.xz.drv'
instantiated 'lndir-1.0.4' -> '/nix/store/75blbb4skvk678av6z8wrywgcrfx0ffh-lndir-1.0.4.drv'
instantiated 'typescript-5.0.4.tgz' -> '/nix/store/vd9cifzq4fqnxv47fifiinzz21vqs99k-typescript-5.0.4.tgz.drv'
instantiated 'pinpointDependencies.js' -> '/nix/store/lmb7vzpyh5p0lxh7j4khs73dpyjzfp5l-pinpointDependencies.js.drv'
instantiated 'typescript-5.0.4' -> '/nix/store/0rr01v04irndmbwbrxbz9ma1l273g0az-typescript-5.0.4.drv'
instantiated 'typescript-language-server-3.3.2' -> '/nix/store/jixsbg3cb9clfgdk98j6abarp6kyqmci-typescript-language-server-3.3.2.drv'
evaluating file '/nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/pkgs/development/tools/yarn/default.nix'
instantiated 'source' -> '/nix/store/xm4p13q93x5hp77var7cv5vv55q99arm-source.drv'
instantiated 'source' -> '/nix/store/l8vvxp85mzgcikv4r35gjlbkdsn6f0mn-source.drv'
instantiated 'yarn-1.22.19' -> '/nix/store/7x6inswda7y1r7828g0742n3jh2xhil7-yarn-1.22.19.drv'
error: attribute 'jest' missing, at /home/runner/TungstenServerio/replit.nix:8:5
(use '--show-trace' to show detailed location information)
1 Like

Seems like you might have accidentally added an invalid package, could you share the contents of your replit.nix file and/or your Repl link?

1 Like

As Firepup said, it’s hard to help if you don’t show us the contents of the replit.nix file. But reading the error, if what you (or your friend) did was upgrade from Nix channel 22_11 to 23_05, you probably forgot to remove pkgs.replitPackages.jest from your replit.nix file. You’re getting the error because replitPackages doesn’t exist in this newer channel, as Replit is moving to Nix modules.

2 Likes

My replit.nix file does contain pkgs.replitPackages.jest:

{pkgs}:{
	deps = [
		pkgs.killall
                pkgs.nodejs-16_x
		pkgs.nodejs-18_x
                pkgs.nodePackages.typescript-language-server
                pkgs.yarn
                pkgs.replitPackages.jest
	];
}
1 Like

And removing the pkgs.replitPackages.jest file solved the error. Thanks @Firepup650 and @LuisAFK !

2 Likes

@ironswordX-dev If @LuisAFK solved your issue, you can mark his post as a Solution.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.