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

Facing SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' #73

Open
DarshanS4444 opened this issue Jun 26, 2024 · 1 comment

Comments

@DarshanS4444
Copy link

Problem Statement - Getting the below error in cypress dashboard when tests are run
SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'
at S. (:4363:61454)
at Object.onceWrapper (node:events:629:26)
at S.emit (node:events:514:28)
at S.emit (:4363:51050)
at ChildProcess. (:4363:50477)
at ChildProcess.emit (node:events:514:28)
at emit (node:internal/child_process:937:14)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

Issue explanation -
installing the package 'cypress-ag-grid' and adding the import in support/e2e.ts file is giving the error when tests are run.

Framework Details - Using Typescript and integrating with '@badeball/cypress-cucumber-preprocessor'

@kpmck
Copy link
Owner

kpmck commented Nov 18, 2024

Hi @DarshanS4444 ! Apologies for the delay in responding, I have been preoccupied with other projects at the moment and haven't been able to revisit the issues on this one just yet. There was another thread where others were experiencing the same issue, and appears to possibly be related to the preprocessor: #9

I would need to dig in a bit to see the true root cause, however. In the meantime, I'm welcoming PRs and will review each one ASAP!

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

No branches or pull requests

2 participants