TypeScript and package.json type module (ESM) shows "ExperimentalWarning: --experimental-loader
"
#30318
Labels
stage: needs investigating
Someone from Cypress needs to look at this
topic: typescript
type: error message
Current behavior
If
package.json
is configured with Node.js type field set tomodule
(instead of left undefined or set tocommonjs
), Typescript is installed andconfig.cypress.ts
is present, then the following warning is output when running Cypress:Desired behavior
Cypress should not show any warning when set up as a TypeScript project and
package.json
includes"type": "module"
for an ESM project.Test code to reproduce
git clone --branch ts-module https://github.com/MikeMcC399/cypress-test-tiny cd cypress-test-tiny npm ci npx cypress run
Cypress Version
13.15.0
Node version
v20.17.0
LTSOperating System
Ubuntu
24.04.1
LTSDebug Logs
Other
Typescript version:
5.6.2
ERR_INTERNAL_ASSERTION
with Node.js >= v22.1.0 andexperimental-detect-module
set #30101The text was updated successfully, but these errors were encountered: