You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting a message that Dynamic require of <> is not supported when I try to run a cypress test either from the command line or from the cypress GUI, not really sure what to do to fix this, I had been under the impression that putting the package in external: ['cypress-*'] would make esbuild ignore my package, but this does not appear to be the correct assumption.
Has anyone had this error before ?
My custom esbuild configurations in cypress/plugins/index.js
node modules are :
"@bahmutov/cypress-esbuild-preprocessor": "2.2.0",
"esbuild": "0.17.19",
My error when I run a test with Cypress
The following error originated from your test code, not from Cypress.
Dynamic require of "cypress-file-upload" is not supported
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Cypress could not associate this error to any specific test.
We dynamically generated a new test to display this failure.
at eval (https://<REDACTED>/__cypress/tests?p=cypress/support/e2e.js:27:11)
at cypress/support/commands.js (<REDACTED>/__cypress/tests?p=cypress/support/e2e.js:40:36)
at __init (https://<REDACTED>/__cypress/tests?p=cypress/support/e2e.js:30:58)
at cypress/support/e2e.js (<REDACTED>/__cypress/tests?p=cypress/support/e2e.js:3453:7)
at __require2 (https://<REDACTED>/__cypress/tests?p=cypress/support/e2e.js:33:52)
at eval (<REDACTED>/__cypress/tests?p=cypress/support/e2e.js:3489:3)
at eval (<REDACTED>/__cypress/tests?p=cypress/support/e2e.js:3490:3)
at eval (<anonymous>)
From previous event:
at evalScripts (<REDACTED>__cypress/runner/cypress_runner.js:168521:58)
at <unknown> (<REDACTED>/__cypress/runner/cypress_runner.js:168530:152)
From previous event:
at runScriptsFromUrls (https://<REDACTED>/__cypress/runner/cypress_runner.js:168530:136)
at Object.runScripts (https://<REDACTED>/__cypress/runner/cypress_runner.js:168571:12)
at $Cypress.onSpecWindow (https://<REDACTED>/__cypress/runner/cypress_runner.js:157151:75)
I am getting a message that Dynamic require of <> is not supported when I try to run a cypress test either from the command line or from the cypress GUI, not really sure what to do to fix this, I had been under the impression that putting the package in external: ['cypress-*'] would make esbuild ignore my package, but this does not appear to be the correct assumption.
Has anyone had this error before ?
My custom esbuild configurations in cypress/plugins/index.js
node modules are :
"@bahmutov/cypress-esbuild-preprocessor": "2.2.0",
"esbuild": "0.17.19",
My error when I run a test with Cypress
my cypress/support/e2e.js file
The text was updated successfully, but these errors were encountered: