So, I am needing to dispatch in my Cypress tests to pre-saturate my redux. It works but whenever I generate an error, or a test fails, I get this cryptic message:
Error: ENOENT: no such file or directory, stat '/Users/bill/Library/Application Support/Cypress/cy/production/projects/coresite-69f7195282475693846caddd826bc773/bundles/cypress/support/index.js'
This occurred while Cypress was compiling and bundling your test code. This is usually caused by:
A missing file or dependency A syntax error in the file or one of its dependencies
Then I have to close my cypress tests, then restart with "npx cypress open". Then its fine.
I think it has to do with my addition of this in the /plugins/index.js file
const wp = require("@cypress/webpack-preprocessor");
module.exports = (on) => {
const options = {
webpackOptions: require('../../webpack.config')({ env: 'development' }),
};
on('file:preprocessor', wp(options));
};
Any ideas on how to fix this? I had to add that plugin cause in one of my files I'm doing:
cy.on("emit:reduxStore", async (store) => {
store.dispatch(actions.updateAreas(data));
});