Cypress CT & Next: getting webpack errors during component mounting after using Cypress' setup wizard
See original GitHub issueCurrent behavior
I’m currently working on getting Cypress Component Testing up and running in my team’s repo. It’s a monorepo managed by NX. Components are React.
I had hoped to save myself from some config headaches by running Cypress in global mode at the root of the repo, and then using the configuration wizard to set up component testing in the desired app folders.
I can see that this wizard is currently in alpha, but I gave it a go (using 10.6.0):
The wizard didn’t flag any issues:
Unfortunately I am getting webpack errors when I attempt to mount a component:
And the browser window simply says Cannot GET /__cypress/src/index.html
Side note: the wizard didn’t add a component-test
action to my project.json
, which the devs tell me is crucial for NX setups.
Desired behavior
As well as detecting that my repo is running on Next, it is able to detect additional configurations and include them in cypress.config.ts
or wherever they need to go
Test code to reproduce
I don’t have a public repo to highlight this issue. However I’m talking this through with Jonathan C at Cypress, and am happy to join a call to give further context
Cypress Version
10.6.0
Node version
16.15.0
Operating System
macOS 12.5.1
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:13 (3 by maintainers)
Top GitHub Comments
Thanks Zach
There’s already an issue raised with NX here: https://github.com/nrwl/nx/issues/11785. It’s been closed, but they’ve committed to working on it
@lmiller1990 sorry I missed your question. The configuration provided to me by @rockindahizzy was enough to get me up and running. Thanks for the help, everyone!
Haven’t forgotten about this. Working on putting a minimal reproduction together