Skip to content
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

dependency issue after webpack-preprocessor 5.12.2 #24768

Closed
iomedico-beyer opened this issue Nov 22, 2022 · 3 comments · Fixed by #24842
Closed

dependency issue after webpack-preprocessor 5.12.2 #24768

iomedico-beyer opened this issue Nov 22, 2022 · 3 comments · Fixed by #24842
Assignees

Comments

@iomedico-beyer
Copy link

iomedico-beyer commented Nov 22, 2022

Current behavior

After updating @cypress/webpack-preprocessor@5.12.2 to any newer version, Cypress 11.1.0 won't run anymore.

I am using yarn 3.2.3, by the way.

Desired behavior

I desire Cypress to run together with latest webpack-preprocessor (and yarn 3).

Test code to reproduce

My cypress.config.js looks like this.

yarn --version # 3.2.3
yarn add cypress@11.1.0
yarn add @cypress/webpack-preprocessor@5.15.5
yarn add @badeball/cypress-cucumber-preprocessor@14.0.0
yarn cypress run

Cypress Version

11.1.0

Node version

16.16.0

Operating System

Windows 10

Debug Logs

Oops...we found an error preparing this test file:

  > cypress\support\e2e.ts

The error was:

Error: Webpack Compilation Error
Module build failed (from ./.yarn/__virtual__/@cypress-webpack-preprocessor-virtual-27935e964b/0/cache/@cypress-webpack-preprocessor-npm-5.15.5-09e14ee4bd-7d09e96a35.zip/node_modules/@cypress/webpack-preprocessor/dist/lib/cross-origin-callback-loader.js):
Error: @cypress/webpack-preprocessor tried to access @babel/traverse, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: @babel/traverse (via "@babel\traverse")
Required by: @cypress/webpack-preprocessor@virtual:1a94a3626686405d7f1bd2ac51272f55fefd14751613f78923df5a48bcae42eacc44e27bd5152e0eeaf662ec45a1f8b10c4bfa2dd6b827aeb3948ade2860dead#npm:5.15.5 (via C:\Users\...\.yarn\__virtual__\@cypress-webpack-preprocessor-virtual-27935e964b\0\cache\@cypress-webpack-preprocessor-npm-5.15.5-09e14ee4bd-7d09e96a35.zip\node_modules\@cypress\webpack-preprocessor\dist\lib\)
...

Other

Workaround:

yarn add @babel/traverse
yarn add @babel/generator
@nagash77
Copy link
Contributor

nagash77 commented Nov 22, 2022

this is likely related to V8 snapshots.. @ryanthemanuel has looked a bit and does not believe it is related to snapshots.

@cypress-bot cypress-bot bot added the stage: needs review The PR code is done & tested, needs review label Nov 28, 2022
@mjhenkes
Copy link
Member

This should be fixed by declaring the dependencies in the package.json for the webpack-preprocessor package. I put up a PR for it.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 9, 2022

The code for this is done in cypress-io/cypress#24842, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants