function getPathToRegexpVersion() {
  let pathToRegexVersion
  try {
    ;({ version: pathToRegexVersion } = JSON.parse(
      fs.readFileSync(path.join(__dirname, '/node_modules/path-to-regexp/package.json'))
    ))
  } catch {
    pathToRegexVersion = '6.0.0'
  }
  return pathToRegexVersion
}
koa-router and @koa/router updated how they defined wildcard routing
It used to be native and then relied on `path-to-regexp`. If `path-to-regexp`
is present get the version. For post 8 it relies on different syntax to define
routes. If it is not present assume the pre 8 behavior of `path-to-regexp`
is the same. Also cannot use require because `path-to-regexp` defines exports
and package.json is not a defined export.