E2E Tests do not support the exports
field from external modules
#23826
Labels
E2E
Issue related to end-to-end testing
existing workaround
npm: webpack-batteries-included-preprocessor
@cypress/webpack-batteries-included-preprocessor package issues
Triaged
Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
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: