import path from 'path'

const puppeteerPath = require.resolve('puppeteer-core')
const puppeteerPkg = require(`${path.dirname(puppeteerPath)}/package.json`)
const puppeteerFirefoxPath = require.resolve('puppeteer-firefox')
const puppeteerFirefoxPkg = require(`${path.dirname(puppeteerFirefoxPath)}/package.json`)

export default async function status () {
    return {
        message: '',
        ready: true,
        puppeteerVersion: puppeteerPkg.version,
        puppeteerFirefoxVersion: puppeteerFirefoxPkg.version
    }
}

@@ -154,101 +154,414 @@
 n%60)%0A
-const puppeteerFirefoxPath = require.resolve('puppeteer-firefox')%0Aconst puppeteerFirefoxPkg =
+%0Alet puppeteerFirefoxPath%0Alet puppeteerFirefoxPkg%0A%0Atry %7B%0A    puppeteerFirefoxPath = require.resolve('puppeteer-firefox')%0A%7D catch (error) %7B%0A    /*%0A     * puppeteer-firefox is an optional dependency and we expect to ignore%0A     * an error from require.resolve if it's not installed%0A     */%0A%7D%0A%0A// Only require puppeteer-firefox package.json if it's installed%0ApuppeteerFirefoxPkg = (puppeteerFirefoxPath) ?%0A   
  req
@@ -618,16 +618,25 @@
 e.json%60)
+ :%0A    %7B%7D
 %0A%0Aexport

Make puppeteer-firefox optional in status.js (#4993)