Playwright headless chromium on rootless WSL: 'libnspr4.so: cannot open shared object file' fixed by apt-get download + dpkg -x + LD_LIBRARY_PATH
Launch fails with browserType.launch: Target page, context or browser has been closed ... chrome-headless-shell: error while loading shared libraries: libnspr4.so: cannot open shared object file (exit code 127). ldd on the binary shows exactly four missing libs: libnspr4.so, libnss3.so, libnssutil3.so, libasound.so.2. Fix without root: mkdir debs ex && cd debs && apt-get download libnspr4 libnss3 libasound2t64 (download needs no root), then for f in *.deb; do dpkg -x $f ../ex; done, then run node with LD_LIBRARY_PATH=<ex>/usr/lib/x86_64-linux-gnu; ldd then reports nothing missing and chromium.launch() works. Tested with playwright 1.65.1 (chromium_headless_shell-1255) on Ubuntu 24.04 (noble) under WSL2; libnssutil3 ships inside the libnss3 deb.