-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
ReferenceError: exports is not defined in ES module scope #26167
Comments
If I remove |
Can you please share a minimal reproduction? It's most likely relating to your Related: You might need to change the Alternatively, if you want to use CommonJS, you can remove |
The whole module system is quite messy... sorry you are running into this.
Not sure about this one - I'll help with I found the problem. In on('file:preprocessor', preprocessor()) Which was the original fix. But later on, it's overridden in on("file:preprocessor", tagify(config)); Seems combining preprocessors is not supported right now... following this issue leads to this feature request. #5832 |
In fact, your exact feature request is here: #5832 (comment) I think there are some cypress-tagify alternatives, have a look around - I can't remember off the top of my head, but I think there's a non-preprocessor based alternative. |
I added a comment about the cypress-tags issue on this thread -> infosum/cypress-tags#217 |
Not sure about a direct alteranative to cypress-tags. Maybe something like https://github.com/bahmutov/cy-grep? Happy to advise more, but since the original issue is resolved (via latest webpack preprocessor) I'll close it to indicate we don't need a patch in Cypress immediately to fix a bug. |
Current behavior
Unable to start cypress with standard command line getting error at startup.
I have "type": "module", within my package.json file
ReferenceError: exports is not defined in ES module scope at file:///Users/williamowens/Documents/GitHub/sponsor-test-automation-cypress/cypress.config.ts:2:23 at ModuleJob.run (node:internal/modules/esm/module_job:175:25) at async Loader.import (node:internal/modules/esm/loader:178:24) at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15) at async loadFile (/Users/williamowens/Library/Caches/Cypress/11.2.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_require_async_child.js:106:14) at async EventEmitter.<anonymous> (/Users/williamowens/Library/Caches/Cypress/11.2.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_require_async_child.js:116:32
Desired behavior
I would like for Cypress to start without the error
Test code to reproduce
This is my cypress.config.ts file
Cypress Version
v11.2.0
Node version
v18.15.0
Operating System
Ventura 13.2.1 (22D68)
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: