An issue with the new packager system (the beta one)

Problem description:
Sometimes, when you type the name of a command that isn’t installed, it shows something like this:
commandName: command not installed, but was located via Nix.
Would you like to run commandName from Nix and add it to your replit.nix file? [Yn]:

Expected behavior:
Add the package to the .replit file instead of the replit.nix file

Actual behavior:
Adds the package to the replit.nix file

Steps to reproduce:
Wear your explorers hat, create a new node.js repl, go to your shell and type something like neofetch or another common command

Bug appears at this link:
https://replit.com/@Wumpus-Dev/explorer-nodejs

Browser/OS/Device:
Chrome/Chrome OS/Asus C202X Chromebook

2 Likes

it does still work and run the command from the replit.nix file though

1 Like

and another thing is, i wrote cowsay as a package in my .replit file and it asked the “would you like to add this to your replit.nix file”

1 Like

Why would you think it’d add it to .replit? Not every command has a Nix module, and if you want to add a new one, you can open the .replit file and add the module in the array and reload the shell (either by running kill 1 or running a different command)

For every module there is, you can have a look on the nixmodules GitHub repo here

2 Likes

yes, i know all of that but I would’ve thought that’s what it did

ok, thank you for the gh repo thing

Nope - running a command will add it to your replit.nix file no matter what repl it is in (legacy nix or nix modules)

will it work like i think it should in the future or not?

Most likely not - although if they do ever adapt it I hope they make the message like this:

node: command not installed, but was located as a Nix module.
Would you like to run node from the module and add it to your .replit file? [Yn]:
1 Like

ok, thank you for that

1 Like

i don’t think they can really edit the message though, cause isn’t it just a command in /usr/bin?