I have a problem, when install the cypress webpack with the project installed cypress coverage appears message
An unexpected error occurred
The function exported by the plugins file threw an error.
We invoked the function exported by C:\Users\Hans\proyectos\axovia\govacasa\govacasa\cypress\plugins\index.js, but it threw an error.
Error: Cannot find module '@cypress/code-coverage/task'
before the installation of webpack package,this package working fine.
plugins/index.js
/**
* @type {Cypress.PluginConfig}
*/
// eslint-disable-next-line no-unused-vars
const injectDevServer = require("@cypress/react/plugins/react-scripts")
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
injectDevServer(on, config)
require('@cypress/code-coverage/task')(on,config)
return config;
}