code-coverage icon indicating copy to clipboard operation
code-coverage copied to clipboard

code-coverage execa does not support Node.js 8.0.0+

Open shijiu1919zyx opened this issue 5 years ago • 2 comments

my code is as follows

module.exports = (on, config) => {
  on('file:preprocessor', cucumber());
  on('task', require('@cypress/code-coverage/task'));
  config.env.API_ENVENV = process.env.API_ENVENV;
  return config;
};

But got the following error ii

shijiu1919zyx avatar Feb 26 '20 01:02 shijiu1919zyx

well, i've had this problem too before. You should check the version of your cypress, and upgrade it to the latest one

sherry007 avatar Feb 26 '20 02:02 sherry007

@shijiu1919zyx What Node.js version are you using?

We encountered a bug for installing Cypress in the 4.0+ version of Cypress where we are inadvertently not supported Node 8.0.0-8.12.0. https://github.com/cypress-io/cypress/issues/6512 (this will be fixed in next release)

This looks to be the exact same issue with the code-coverage plugin. The execa dep of 4.0.0 for this plugin requires a minimum Node version of 10.0.0.

@bahmutov I think we should roll back execa dep for this plugin. We should support the same Node version for our own plugins as we do for Cypress (aka 8.0.0), so roll back execa to 1.0.0

For now, you can upgrade to use Node version 10.0.0. I couldn't actually even find a previous version of this plugin that was ever using execa 1.0.0.

jennifer-shehane avatar Feb 26 '20 05:02 jennifer-shehane