`pnpm test:watch` Not working
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24
- Forks
- 41
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 12
Description
Description
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/openfn/Workspace/adaptors/packages/common/test/dateFns.test.js from /Users/openfn/Workspace/adaptors/node_modules/.pnpm/mocha@9.2.2/node_modules/mocha/lib/mocha.js not supported.
Instead change the require of dateFns.test.js in /Users/openfn/Workspace/adaptors/node_modules/.pnpm/mocha@9.2.2/node_modules/mocha/lib/mocha.js to a dynamic import() which is available in all CommonJS modules.
at /Users/openfn/Workspace/adaptors/node_modules/.pnpm/mocha@9.2.2/node_modules/mocha/lib/mocha.js:417:36
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/Users/openfn/Workspace/adaptors/node_modules/.pnpm/mocha@9.2.2/node_modules/mocha/lib/mocha.js:414:14)
at Mocha.run (/Users/openfn/Workspace/adaptors/node_modules/.pnpm/mocha@9.2.2/node_modules/mocha/lib/mocha.js:1015:10)
at Object.run (/Users/openfn/Workspace/adaptors/node_modules/.pnpm/mocha@9.2.2/node_modules/mocha/lib/cli/watch-run.js:263:22)
at FSWatcher.<anonymous> (/Users/openfn/Workspace/adaptors/node_modules/.pnpm/mocha@9.2.2/node_modules/mocha/lib/cli/watch-run.js:184:14)
^C⚠ [mocha] cleaning up, please wait...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running pnpm test:watch and inspect the watch-test setup around packages/common/test/dateFns.test.js and the reported Mocha 9.2.2 loader error. The work is done when the command starts successfully and continues watching the tests without the ERR_REQUIRE_ESM failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100