Your configFile is invalid: /path/to/cypress.config.js

The e2e.setupNodeEvents() function must be defined with the following signature:

{
  e2e: {
    setupNodeEvents(on, config) {
      // configure tasks and plugins here
    }
  }
}

Instead we saw:

{
  "some": "object"
}

https://on.cypress.io/plugins-api