Currently, I am working on building my NextJS app and incorporating Cypress for testing along with Typescript. During this process, I encountered the following error:
Type error: 'home.cy.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.
Error location: ./cypress/e2e/home.cy.ts:1:1
GitHub link: https://github.com/GSdaBlessedFist/unsplash-inspired/blob/main/cypress/e2e/home.cy.ts
- I have already included an export in my index.ts file
- I attempted setting
, in the tsconfig.json file, but the issue persists."isolatedModules": false