-
Notifications
You must be signed in to change notification settings - Fork 3.3k
E2E Tests do not support the exports
field from external modules
#23826
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
Thanks for opening this issue @nbouvrette Looking into this, I found this webpack issue. Support for respecting You've already noted a workaround for this (by using the full path to the You can use Webpack 5 as your preprocessor by downloading
The processor will resolve the version of webpack you have installed in your project, and if you install >=5 it will fix the Going to leave open until we switch to using |
Thanks for the suggestion - unfortunately, it looks like I think I will stick with my workaround for now and hopefully we can have Cypress on Webpack5 this year :) |
The security vulnerability is not ideal, could be the driving force to push us to upgrade to webpack 5! Thanks for the info, going to post in the Webpack 5 issue and hopefully gets some traction. |
This was addressed with #27438. closing |
Current behavior
I'm writing an E2E test for Next.js and I am trying to do the following in one of my tests:
The test fails with the following unclear Webpack error which from what I understood means "package is not found":
I can make this work using the following workaround, bypassing the
exports
configuration from the package.Desired behavior
Importing a package using
exports
should work like any other Node.js application.Test code to reproduce
npx create-next-app --example with-cypress with-cypress-app
npm install properties-file
/cypress/e2e/app.cy.ts
:Cypress Version
10.8.0
Node version
v16.17.0
Operating System
macOS 12.5.1
Debug Logs
Other
No response
The text was updated successfully, but these errors were encountered: