Cannot install nix package "firebase-tools"

I’m having some issues trying to install a nix package that I need.

I’ve followed the official replit guide available for installing packages with nix (available here:

And added the package firebase-tools from the NixOS search page to my nix config file like so:

{ pkgs }: {
	deps = [

But when I try to run the project I get the following error:

nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
         whose name attribute is located at /nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/stdenv/generic/make-derivation.nix:270:7

       … while evaluating attribute 'REPLIT_LD_LIBRARY_PATH' of derivation 'nix-shell'

         at «string»:304:9:

          303|       {
          304|         REPLIT_LD_LIBRARY_PATH = (pkgs.lib.optionalString (env ? REPLIT_LD_LIBRARY_PATH) (env.REPLIT_LD_LIBRARY_PATH + ":")) +
             |         ^
          305|           pkgs.lib.makeLibraryPath deps;

       error: attribute 'firebase-tools' missing

       at /home/runner/LameProfuseLaw/replit.nix:5:5:

            4|           pkgs.nodejs-18_x
            5|     pkgs.firebase-tools
             |     ^
            6|     ];

Are there limits on the packages that can be installed from NixOS or am I doing something wrong?

Replit Profile:

Maybe you could install firebase-tools or just firebase with the appropriate packager manager (npm for js, poetry for Python)?

Hello, it seems you are using the nix channel 23.05 or older. To use pkgs.firebase-tools, the nix channel (located in .replit file) must be "stable-23_11" or "unstable".
Most system dependencies are installed automatically when using the Packages tool.

1 Like

What about running npm install -g firebase-tools in the Shell? Taken directly from the docs.

1 Like

Thanks both for your help, I was actually able to just install and run it locally with npx in the end. Unfortunately I don’t think Replit will work for my needs though as it seems to have a lot of restrictions on what ports you can use so the firebase emulators won’t work.

Are you trying to use firebase-tools for CLI commands (e.g. to deploy)?
I’ve tried to do it, and it worked (deployment data showed up on Firebase’s side). It didn’t work, however, because of some other issue I couldn’t fix. (If I remember correctly)

I’m trying to run firebase emulators:start which runs okay but produces a number of warnings about the ports being unavailable. I’ve set up the ports as per the Replit docs, but as it only supports 2 ports I can only emulate one feature of firebase and the emulator UI (I’ve tried successfully with this, but it means I can only run auth which isn’t enough for developing a project)

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