Updated shell.nix
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m11s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m11s
This commit is contained in:
29
shell.nix
29
shell.nix
@ -4,7 +4,6 @@ pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nodejs_24
|
||||
nodePackages.pnpm
|
||||
chromium
|
||||
git
|
||||
curl
|
||||
];
|
||||
@ -13,25 +12,27 @@ pkgs.mkShell {
|
||||
echo "🚀 atridotdad development environment loaded!"
|
||||
echo "Node version: $(node --version)"
|
||||
echo "pnpm version: $(pnpm --version)"
|
||||
echo "Chromium path: ${pkgs.chromium}/bin/chromium"
|
||||
|
||||
# Playwright environment variables
|
||||
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
||||
export PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH="${pkgs.chromium}/bin/chromium"
|
||||
# Always allow Playwright/Puppeteer to download their own browsers
|
||||
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
|
||||
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=false
|
||||
|
||||
# Keep old Puppeteer vars for compatibility (in case you have other code using it)
|
||||
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
export PUPPETEER_EXECUTABLE_PATH="${pkgs.chromium}/bin/chromium"
|
||||
|
||||
if [ ! -d "node_modules" ]; then
|
||||
echo "📦 Installing dependencies..."
|
||||
echo "📦 Installing pnpm dependencies..."
|
||||
pnpm install
|
||||
fi
|
||||
|
||||
# Check if Playwright browsers are installed and install them if not
|
||||
PLAYWRIGHT_BROWSERS_PATH="$HOME/.cache/ms-playwright"
|
||||
if [ ! -d "$PLAYWRIGHT_BROWSERS_PATH" ] || [ -z "$(ls -A "$PLAYWRIGHT_BROWSERS_PATH")" ]; then
|
||||
echo "🌐 Installing Playwright browsers..."
|
||||
pnpm exec playwright install --with-deps # --with-deps ensures all necessary drivers/libraries are also fetched
|
||||
else
|
||||
echo "✅ Playwright browsers already installed."
|
||||
fi
|
||||
'';
|
||||
|
||||
# Environment variables
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
|
||||
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH = "${pkgs.chromium}/bin/chromium";
|
||||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = "true";
|
||||
PUPPETEER_EXECUTABLE_PATH = "${pkgs.chromium}/bin/chromium";
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "0";
|
||||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = "false";
|
||||
}
|
Reference in New Issue
Block a user