Run isn't configured. Try adding a .replit and configuring it https://docs.replit.com/programming-ide/configuring-run-button

Hello guys, I have an error here, I want to learn how to work with canvas and for this I need to implement some changes in replit.nix, I did this and then the following error followed:

nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
       b) for `nixos-rebuild` you can add ‘nodejs-16.20.0’ to
          `nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
          like so:

            {
              nixpkgs.config.permittedInsecurePackages = [
                "nodejs-16.20.0"
              ];
            }

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
          ‘nodejs-16.20.0’ to `permittedInsecurePackages` in
          ~/.config/nixpkgs/config.nix, like so:

            {
              permittedInsecurePackages = [
                "nodejs-16.20.0"
              ];
            }

I’ve been trying to fix this for 3 days now! My replit.nix file and .replit file.

replit.nix

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

.replit

entrypoint = "index.js"
modules = ["nodejs-16.20.2"]
hidden = [".config", "package-lock.json"]

[nix]
channel = "stable-22_11"

[unitTest]
language = "nodejs"

[deployment]
command = "node index.js"
deploymentTarget = "cloudrun"
ignorePorts = false

I will be very grateful for your help!!!

Hey, @limpotopsd welcome to the forums!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

2 Likes

Hello,
the deps list in replit.nix should usually be empty if there is a modules variable in .replit.
You say that you would like to work with canvas and you needed to make some changes in replit.nix, what changes do you need to make? Also, can you direct me to some resources about it (I have no experience in NodeJS)?

1 Like