jordanpowell88 / angular-ct

Angular Component Testing
19 stars 2 forks source link

Invalid `cypress.config.ts` error #35

Open yjaaidi opened 2 years ago

yjaaidi commented 2 years ago

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
parky128 commented 2 years ago

@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,

jordanpowell88 commented 2 years ago

@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

parky128 commented 2 years ago

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

yjaaidi commented 2 years ago

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