cypress icon indicating copy to clipboard operation
cypress copied to clipboard

Trouble upgrading to v10

Open ZebGirouard opened this issue 2 years ago • 3 comments

Hi, I'm working through the Testing Web Apps with Cypress course on FE Masters, and I'm having difficulty upgrading Cypress to the latest version. I've been looking on StackOverflow for a few minutes now, and I'm just wondering...has someone already upgraded with this repo?

This is the error:

Your /Users/zebgirouard/Coding/tuts/cypress/cypress/plugins/index.ts file threw an error.
Please ensure your pluginsFile is valid and relaunch the migration tool to migrate to Cypress version 10.0.0.

I tried commenting out the imports in that file, and it's still the same error after re-running DEBUG=cypress* npx cypress open.

And unfortunately the videos for migrating to v10 on the Cypress site seem to assume that this error does not show--that I should just see a "Migrate to v10" button or something in the UI.

ZebGirouard avatar Aug 29 '22 22:08 ZebGirouard

We recorded this course before 10.0.0 was even in beta yet and this repository reflects the content in the course. I'll defer to @1Marc on this, but we'll probably update this course to the latest version of Cypress, which I think is at like 12.7.0 as I write this.

stevekinney avatar Mar 08 '23 19:03 stevekinney

I second this. I've spent a few hours trying to migrate it to v12 and can't figure it out. Would love to know when this is being updated.

Tyrell-Blackburn avatar Jun 26 '23 22:06 Tyrell-Blackburn

Hey! 👋

Maybe this will help someone I was migrating to cypress v13 and faced the same error

Here's what you need to do:

  1. Remove cypress.json
  2. Create cypress.config.js with the following content
import { defineConfig } from 'cypress'
import plugins from './cypress/plugins' 

export default defineConfig({
  e2e: {
    baseUrl: 'http://localhost:3000',
    specPattern: '**/*.spec.{js,ts}', // <-- by default it uses cypress/e2e/**/*.cy.{js,jsx,ts,tsx}
    setupNodeEvents(on, config) {
      return plugins(on, config)
    },
  },
})
  1. Rename cypress/integration to cypress/e2e
  2. Rename cypress/support/index.js to cypress/support/e2e.js

I hope I haven't forgotten anything

e-serebriakov avatar Dec 13 '23 17:12 e-serebriakov