Replit shell boots up as Node v16, causing corrupt caches

Problem description:
Creating a new Replit for TS code will always open a Node v16 shell, regardless of what Node version you’ve defined in your repo’s replit.nix.

If someone instinctively runs npm i they will have a corrupt node_modules cache that will cause problems with the repo.

Expected behavior:

  1. No shell should auto open, or if it does, it should have the same version of NixOS / NodeJS as defined in replit.nix
  2. Typing cd FOLDER into the shell should cd into said folder

Actual behavior:

  1. cd triggers a shell reload, clearing your bash history… ejecting you from the folder you just tried to cd into. Forcing you to type it all over again.

Steps to reproduce:

  1. Create a new TS repl from a repo that calls for Node 18 or higher
  2. switch to the automatically opened Shell tab
  3. Run node --version

Bug appears at this link:
Feathers Chat

Browser/OS/Device:
Yes, Yes, Computer

2 Likes

I ran node -v in that repl and it said it was version v19.1.0, not 16.x, so you probably should just reboot your repl

You sure you did nothing but click the shell tab and type node --versions?

It only fails in the pre opened tab

1 Like

Is that different then node -v or node --version?

It worked on the pre-opened tab for me

I can reproduce it on multiple accounts and in Incognito

Try running it again after the “detecting change, reloading environment”. And that is not what happened for me, idk.

1 Like