Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/remote/test/puppeteer/packages/puppeteer/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 987 B image not shown  

Quelle  install.mjs   Sprache: unbekannt

 
#!/usr/bin/env node

/**
 * @license
 * Copyright 2017 Google Inc.
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * This file is part of public API.
 *
 * By default, the `puppeteer` package runs this script during the installation
 * process unless one of the env flags is provided.
 * `puppeteer-core` package doesn't include this step at all. However, it's
 * still possible to install a supported browser using this script when
 * necessary.
 */

/**
 * @returns {import("puppeteer/internal/node/install.js")}
 */
async function importInstaller() {
  try {
    return await import('puppeteer/internal/node/install.js');
  } catch {
    console.warn(
      'Skipping browser installation because the Puppeteer build is not available. Run `npm install` again after you have re-built Puppeteer.',
    );
    process.exit(0);
  }
}

try {
  const {downloadBrowsers} = await importInstaller();
  downloadBrowsers();
} catch (error) {
  console.warn('Browser download failed', error);
}

[ Dauer der Verarbeitung: 0.24 Sekunden  (vorverarbeitet)  ]