angular-ct icon indicating copy to clipboard operation
angular-ct copied to clipboard

Invalid `cypress.config.ts` error

Open yjaaidi opened this issue 3 years ago • 4 comments

Hey Jordan, I finally managed to dive a bit into cypress-angular-dev-server but I am encountering some weird issue here.

I tried migrating the tests/cypress-mount-integration nx project here: https://github.com/jscutlery/devkit/tree/upgrade-cypress-10 but I get an invalid cypress.config.ts error. I thought it was an issue with cypress but it seems to only crash when I use cypress-angular-dev-server. So, I tried with the following configuration and it crashes way later when trying to find the webpack config which makes sense.

import { defineConfig } from 'cypress';

export default defineConfig({
  component: {
    devServer: {
      framework: 'react',
      bundler: 'webpack',
    },
  },
})

I've been trying with Cypress 10.0.3 & 10.1.0 and it breaks with both.

If you want to try by yourself, you can checkout the branch https://github.com/jscutlery/devkit/tree/upgrade-cypress-10 and run the tests/cypress-mount-integration project: yarn && yarn cypress open -P tests/cypress-mount-integration

Let me know if you need any additional info. Thanks in advance for your help.

Screen Shot 2022-06-12 at 3 57 31 PM

yjaaidi avatar Jun 12 '22 14:06 yjaaidi

@yjaaidi did you ever get past this? I see @jordanpowell88 referenced this issue regarding the version of @cypress/webpack-dev-server. I am facing the same error, using angular 12 with Nx and on 10.3.0 of Cypress,

parky128 avatar Jul 01 '22 13:07 parky128

@yjaaidi did you ever get past this? I see @jordanpowell88 referenced this issue regarding the version of @cypress/webpack-dev-server. I am facing the same error, using angular 12 with Nx and on 10.3.0 of Cypress,

I have shifted most of my focus to moving this work into the Cypress directly. Keep an eye out for this PR https://github.com/cypress-io/cypress/pull/22314

jordanpowell88 avatar Jul 01 '22 13:07 jordanpowell88

Oh wow, thats even better, I will certainly be keeping an eye on that!

parky128 avatar Jul 01 '22 14:07 parky128

The postinstall script should have fixed this. But we probably don't need this anymore

yjaaidi avatar Jul 04 '22 19:07 yjaaidi