How can i install playwright dependencies

Hello,
sorry if it’s dumb but i am new here. I would like to install playwright along with its dependencies:

libnss3.so                                       ║
║     libnssutil3.so                                   ║
║     libsmime3.so                                     ║
║     libnspr4.so                                      ║
║     libatk-1.0.so.0                                  ║
║     libatk-bridge-2.0.so.0                           ║
║     libcups.so.2                                     ║
║     libdrm.so.2                                      ║
║     libdbus-1.so.3                                   ║
║     libatspi.so.0                                    ║
║     libXcomposite.so.1                               ║
║     libXdamage.so.1                                  ║
║     libXfixes.so.3                                   ║
║     libgbm.so.1                                      ║
║     libexpat.so.1                                    ║
║     libxcb.so.1                                      ║
║     libxkbcommon.so.0                                ║
║     libpango-1.0.so.0                                ║
║     libcairo.so.2                                    ║
║     libasound.so.2      

But I dont see any way how to do it since the apt doesnt work here.
Thanks for help.

Welcome to Ask @tatavojta123!

Replit uses the Nix Package manager, so you can just type playwright into the Shell, and use arrow keys or type to search.

@Fairies0feast That won’t install the dependencies either. Still same problem.

1 Like

You can try edit the replit.nix file and add the extensions manually

{ pkgs }: {
  deps = [
    pkgs.libnss3
    # Just keep adding the dependencies
  ];
}
3 Likes
nix error: couldn't get nix env building nix env: exit status 1
Output has been trimmed to the last 20 lines

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

         at «string»:309:9:

          308|       {
          309|         REPLIT_LD_LIBRARY_PATH = (pkgs.lib.optionalString (env ? REPLIT_LD_LIBRARY_PATH) (env.REPLIT_LD_LIBRARY_PATH + ":")) +
             |         ^
          310|         pkgs.lib.makeLibraryPath deps;

       error: attribute 'libnss3' missing

       at /home/runner/BakaBot/replit.nix:4:5:

            3|     pkgs.playwright
            4|     pkgs.libnss3
             |     ^
            5|     pkgs.libnspr4
       Did you mean one of libass, libnfs, libnsl, libs3 or libssh?

nix error: couldn't get nix env building nix env: exit status 1
Output has been trimmed to the last 20 lines

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

         at «string»:309:9:

          308|       {
          309|         REPLIT_LD_LIBRARY_PATH = (pkgs.lib.optionalString (env ? REPLIT_LD_LIBRARY_PATH) (env.REPLIT_LD_LIBRARY_PATH + ":")) +
             |         ^
          310|         pkgs.lib.makeLibraryPath deps;

       error: attribute 'libnss3' missing

       at /home/runner/BakaBot/replit.nix:4:5:

            3|     pkgs.playwright
            4|     pkgs.libnss3
             |     ^
            5|     pkgs.libnspr4
       Did you mean one of libass, libnfs, libnsl, libs3 or libssh?
1 Like

The closest match for that package I could find on Nix is libnss-mysql.