You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once cypress-plugin-snapshots/commands is imported in cypress/support/index.js, running component tests (i.e. npx cypress open-ct errors out with Cannot find module 'crypto'.
Note that I'm not trying to run cypress-plugin-snapshots in component testing. It just happens to error out.
To Reproduce
Steps to reproduce the behavior:
Set up Cypress component testing
Add some example component tests
Run npx cypress open-ct
Click a spec file
See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Desktop (please complete the following information):
OS: OSX
Cypress Version 8.0.0.
Used webpack for setting up Cypress component testing.
Additional context
I've attempted to fix the error by adding fallbacks in webpack.
I eventually had to add fallbacks of crypto, path, and stream.
After that it still complains that process is not defined.
I also searched for disabling cypress-plugin-snapshots only in component testing but I couldn't find a way.
The commands are always executed in both integration testing and component testing.
The text was updated successfully, but these errors were encountered:
That's a problem that I ran into when I tried to use webpack (v5) dev configuration.
I added buffer package to dev dependencies, then added buffer package in webpack config like following
nothing worked for me (running on vite.js), so I've overridden the supportFile location path only for component tests, where I did not import cypress-plugin-snapshots/commands
Describe the bug
Once
cypress-plugin-snapshots/commands
is imported incypress/support/index.js
, running component tests (i.e.npx cypress open-ct
errors out withCannot find module 'crypto'
.Note that I'm not trying to run
cypress-plugin-snapshots
in component testing. It just happens to error out.To Reproduce
Steps to reproduce the behavior:
npx cypress open-ct
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Desktop (please complete the following information):
Additional context
I've attempted to fix the error by adding fallbacks in webpack.
I eventually had to add fallbacks of
crypto
,path
, andstream
.After that it still complains that
process
is not defined.I also searched for disabling
cypress-plugin-snapshots
only in component testing but I couldn't find a way.The commands are always executed in both integration testing and component testing.
The text was updated successfully, but these errors were encountered: