-
Notifications
You must be signed in to change notification settings - Fork 111
Missing @cypress/code-coverage/use-browserify-istanbul
in 3.10.0 release
#573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I stumbled upon the same issue |
Ran `cypress open` and walked through migration guide. It generated cypress.config.ts which I renamed to cypress.config.js and reverted to `require()` instead of `import` because of stupid TypeScript typings warnings related to the plugins, which seem perfectly fine. e2e tests all run and pass as before. Unfortunately, coverage is broken because we also need `@cypress/[email protected]` which supports Cypress 10, but it has an issue with this error: cypress-io/code-coverage#573
Ran `cypress open` and walked through migration guide. It generated cypress.config.ts which I renamed to cypress.config.js and reverted to `require()` instead of `import` because of stupid TypeScript typings warnings related to the plugins, which seem perfectly fine. e2e tests all run and pass as before. Unfortunately, coverage is broken because we also need `@cypress/[email protected]` which supports Cypress 10, but it has an issue with this error: cypress-io/code-coverage#573
* [DEPENDABOT]: Bump cypress from 9.7.0 to 10.0.3 Bumps [cypress](https://github.com/cypress-io/cypress) from 9.7.0 to 10.0.3. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js) - [Commits](cypress-io/cypress@v9.7.0...v10.0.3) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Migrate to Cypress 10 Ran `cypress open` and walked through migration guide. It generated cypress.config.ts which I renamed to cypress.config.js and reverted to `require()` instead of `import` because of stupid TypeScript typings warnings related to the plugins, which seem perfectly fine. e2e tests all run and pass as before. Unfortunately, coverage is broken because we also need `@cypress/[email protected]` which supports Cypress 10, but it has an issue with this error: cypress-io/code-coverage#573 * Remove lint * Fix lock file conflict * Apparent must still specify cypress config file? * No difference, reverted, but now bumped Cypress version in CI, hoping... * Try with updated Cypress GH Action * Disable broken code coverage * Try cypress/code-coverage 3.9.x for fun * Revert "Try cypress/code-coverage 3.9.x for fun" This reverts commit 68e1d03. 3.9.x fails with the same missing reference error. * Update lock file for some reason (unexpected) * Update how cypress/code-coverage plugin is installed/configured https://docs.cypress.io/guides/tooling/code-coverage#Install-the-plugin Found a reference to this path that has been the problem so far: ```javascript on( 'file:preprocessor', require('@cypress/code-coverage/use-browserify-istanbul') ); ``` Removed since that's not in the installation instructions (maybe it was at one point, but no longer). * See if Codecov GH Action will make everything better Instead of manually installing codecov globally and running it... References: - https://github.com/marketplace/actions/codecov - https://relatablecode.com/how-to-add-cypress-codecov-in-github-actions-in-react-app * cypress/code-coverage does NOT instrument the code for you... https://github.com/cypress-io/code-coverage#instrument-unit-tests Ah. Finally, circle right back to the original issue of the ellusive `@cypress/code-coverage/use-browserify-istanbul` reference which no longer exists in version 3.10.0 of `@cypress/code-coverage`. The only thing cypress/code-coverage provides now is `@cypress/code-coverage/use-babelrc`, which has peer dependencies on webpack, babel-loader, babel/preset-env and babel/core. After all those added, and babel.config.js configured under 'test' env (and added `BABEL_ENV=test` to package.json 'test:coverage' script that runs Cypress with coverage option), things are looking good locally with .nyc_output/out.json once again generated. Let's see if it works and reports in GH Actions now. Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefan Cameron <[email protected]>
Well that was "fun": focus-trap/tabbable#692 (my journey upgrading from Cypress 9.x to 10.0.3), particularly foiled by this very issue. In the end, it came down to this old code that was still referencing the now-missing dependency: on(
'file:preprocessor',
require('@cypress/code-coverage/use-browserify-istanbul')
); That needed to be replaced with the only one that remains in the 3.10.0 package now, which is Here's the commit message from the changes that finally got stuff working again:
|
It is failing for me also, any alternate to fix this and get code coverage? |
I have the same issue. It has been for almost one year. Does this issue have ignored? |
This is made all the more confusing because the current docs still reference browserify as an option. Further, there is no indication in commit messages that this was removed, and it was removed on a minor release. At a minimum the Readme should be updated to not reference browserify as an option. |
Any updates on this issue? I am trying to set this up in my project and facing the same issue now. Help anyone? EDIT: am using cypress v12.17.2 |
+1 for |
Logs and screenshots
Versions
Version
3.10.0
Describe the bug
With the release of the 3.10.0 version of
@cypress/code-coverage
, theuse-browserify-istanbul
entry point is missing. In looking at the release, it appears this commit for Cypress 10 compatibility introduced it. However, the entrypoint is still referenced in theREADME
, so I'm assuming that removing that file was a breaking change intended for a major release.Link to the repo
n/a
The text was updated successfully, but these errors were encountered: