text: #!/usr/bin/env node
  // babel-preset-env doesn't find this import if you
  // use require() with backtick strings so use the es6 syntax
  "use strict";
  
  require("core-js/modules/es7.array.flat-map");
  
  require("core-js/modules/es6.array.from");
  
  require("core-js/modules/es6.array.sort");
  
  require("core-js/modules/es6.array.species");
  
  require("core-js/modules/es6.function.has-instance");
  
  require("core-js/modules/es6.map");
  
  require("core-js/modules/es7.object.define-getter");
  
  require("core-js/modules/es7.object.define-setter");
  
  require("core-js/modules/es7.object.entries");
  
  require("core-js/modules/es7.object.get-own-property-descriptors");
  
  require("core-js/modules/es7.object.lookup-getter");
  
  require("core-js/modules/es7.object.lookup-setter");
  
  require("core-js/modules/es6.object.to-string");
  
  require("core-js/modules/es7.object.values");
  
  require("core-js/modules/es6.promise");
  
  require("core-js/modules/es7.promise.finally");
  
  require("core-js/modules/es6.set");
  
  require("core-js/modules/es6.symbol");
  
  require("core-js/modules/es7.symbol.async-iterator");
  
  require("core-js/modules/es7.string.pad-start");
  
  require("core-js/modules/es7.string.pad-end");
  
  require("core-js/modules/es7.string.trim-left");
  
  require("core-js/modules/es7.string.trim-right");
  
  require("core-js/modules/es6.typed.array-buffer");
  
  require("core-js/modules/es6.typed.int8-array");
  
  require("core-js/modules/es6.typed.uint8-array");
  
  require("core-js/modules/es6.typed.uint8-clamped-array");
  
  require("core-js/modules/es6.typed.int16-array");
  
  require("core-js/modules/es6.typed.uint16-array");
  
  require("core-js/modules/es6.typed.int32-array");
  
  require("core-js/modules/es6.typed.uint32-array");
  
  require("core-js/modules/es6.typed.float32-array");
  
  require("core-js/modules/es6.typed.float64-array");
  
  require("core-js/modules/es6.weak-map");
  
  require("core-js/modules/es6.weak-set");
  
  const semver = require(`semver`);
  
  const util = require(`util`);
  
  const useJsonLogger = process.argv.slice(2).some(arg => arg.includes(`json`));
  
  if (useJsonLogger) {
    process.env.GATSBY_LOGGER = `json`;
  }
  
  const createCli = require(`./create-cli`);
  
  const report = require(`./reporter`);
  
  const pkg = require(`../package.json`);
  
  const updateNotifier = require(`update-notifier`); // Check if update is available
  
  
  updateNotifier({
    pkg
  }).notify({
    isGlobal: true
  });
  const MIN_NODE_VERSION = `>=8.0.0`;
  
  if (!semver.satisfies(process.version, MIN_NODE_VERSION)) {
    report.panic(report.stripIndent(`
        Gatsby requires Node.js v8 or higher (you have ${process.version}).
        Upgrade Node to the latest stable release: https://gatsby.dev/upgrading-node-js
      `));
  }
  
  process.on(`unhandledRejection`, reason => {
    // This will exit the process in newer Node anyway so lets be consistent
    // across versions and crash
    // reason can be anything, it can be a message, an object, ANYTHING!
    // we convert it to an error object so we don't crash on structured error validation
    if (!(reason instanceof Error)) {
      reason = new Error(util.format(reason));
    }
  
    report.panic(`UNHANDLED REJECTION`, reason);
  });
  process.on(`uncaughtException`, error => {
    report.panic(`UNHANDLED EXCEPTION`, error);
  });
  createCli(process.argv);