Open howdoilearn opened 1 month ago
@howdoilearn thanks for raising an issue, mind providing a minimal reproducible example? It seems like a configuration issue.
I just followed the instructions at - https://github.com/webdriverio/component-testing-examples
After I cloned the repo, I followed the instructions:-
"Switch to the desired example directory"
cd ./
"Install dependencies" /this is fine /
npm install
Run WebdriverIO tests: This gives the "FileSystemPathService.js is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules."
npm run wdio
It is related to Typescript I am running component testing using wdio of js - for example there is no issue with the set up instructions and execution for - component-testing/svelte-example.js
npm run wdio
of ES modules is not supported. require() of /Users/testuser/git/component-testing-examples/react-typescript-vite/wdio.conf.ts from /Users/testuser/git/component-testing-examples/react-typescript-vite/node_modules/@wdio/cli/node_modules/@wdio/config/build/lib/FileSystemPathService.js is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.