Webpack config issue with Cypress component testing #489
Replies: 2 comments 5 replies
-
Hey @aleksandrlat! For this you'll have to provide an example repo as a reproduction because this is an issue with whatever bundler that's being used to compile the components (TypeScript, Webpack, Vite, Rollup, etc). Looks like in the stack trace you're using Webpack, so the issue is going to lie within that webpack config. For some reason that webpack config is trying to recomplile an already complied browser bundle (or is trying to grab the node complied version), which won't work. |
Beta Was this translation helpful? Give feedback.
-
@Robdel12 yes we use webpack and typescript. It can be time consuming to make example repo. |
Beta Was this translation helpful? Give feedback.
-
The problem
After I install @percy/cypress and import it in
cypress/support/index.js
I get this error when run test in CypressI'm running Cypress component test.
If I add
zlib
polyfill it starts to fail with another error when another polyfill is needed and so onEnvironment
@percy/cli
version: ^1.0.8@percy/cypress
version: ^3.1.1Details
Looks like https://www.npmjs.com/package/ws does not work in browser and when we run cypress component tests we run everything in browser
But percy docs say it should work with component testing https://docs.percy.io/docs/cypress#component-testing
Beta Was this translation helpful? Give feedback.
All reactions