Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit 47f50b0

Browse files
committed
Document TypeScript requirements
Without setting moduleResolution to `node16` or `nodenext`, the following error may occur: Your configFile is invalid: <...>/node_modules/@unflakable/cypress-plugin/dist/config-wrapper.mjs It threw an error when required, check the stack trace below: Error: Cannot find module 'file://<...>/node_modules/@unflakable/cypress-plugin/dist/config-wrapper.mjs' Require stack: - <...>/packages/server/lib/plugins/child/run_require_async_child.js - <...>/packages/server/lib/plugins/child/require_async_child.js For some reason, this error doesn't seem to happen on Linux, or at least not in the `cypress/browsers:node16.16.0-chrome105-ff104-edge` Docker container.
1 parent 26b42b0 commit 47f50b0

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ This plugin maintains compatibility with the Cypress and Node.js versions listed
3131
[![11.2.0+ | 12.0.0+](https://img.shields.io/badge/Cypress-11.2.0%2B%20%7C%2012.0.0%2B-17202C?logo=cypress&labelColor=white&logoColor=17202C&style=flat)](https://cypress.io)
3232
[![16 | 18 | 20](https://img.shields.io/badge/Node.js-16%20%7C%2018%20%7C%2020-339933?logo=node.js&labelColor=white&logoColor=339933&style=flat)](https://nodejs.org)
3333

34+
For TypeScript projects, `typescript` version 4.7 or later is required, and `tsconfig.json` must set
35+
[`moduleResolution`](https://www.typescriptlang.org/tsconfig#moduleResolution) to `node16` or
36+
`nodenext`. This setting is required so that
37+
[ES modules](https://nodejs.org/api/esm.html#modules-ecmascript-modules) resolve correctly.
38+
3439
## Jest Plugin
3540

3641
The Jest plugin enables users of the [Jest](https://jestjs.io) JavaScript test framework

packages/cypress-plugin/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ This plugin maintains compatibility with the Cypress and Node.js versions listed
2222
[![11.2.0+ | 12.0.0+](https://img.shields.io/badge/Cypress-11.2.0%2B%20%7C%2012.0.0%2B-17202C?logo=cypress&labelColor=white&logoColor=17202C&style=flat)](https://cypress.io)
2323
[![16 | 18 | 20](https://img.shields.io/badge/Node.js-16%20%7C%2018%20%7C%2020-339933?logo=node.js&labelColor=white&logoColor=339933&style=flat)](https://nodejs.org)
2424

25+
For TypeScript projects, `typescript` version 4.7 or later is required, and `tsconfig.json` must set
26+
[`moduleResolution`](https://www.typescriptlang.org/tsconfig#moduleResolution) to `node16` or
27+
`nodenext`. This setting is required so that
28+
[ES modules](https://nodejs.org/api/esm.html#modules-ecmascript-modules) resolve correctly.
29+
2530
## Contributing
2631

2732
To report a bug or request a new feature, please

0 commit comments

Comments
 (0)