-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Current behavior
The Cypress scaffolding process sets up a TypeScript E2E project using JavaScript. The project consists of Yarn Modern 4.x
and TypeScript 5.x
dependencies, with Yarn configured using the default nodeLinker setting of pnp
(Plug'n'Play).
Scaffolding detection is incompatible with Yarn Modern Plug'n'Play (PnP).
Desired behavior
Cypress should detect TypeScript if installed, whatever Yarn Modern nodeLinker is set to.
Test code to reproduce
cd $(mktemp -d)
git init
corepack enable yarn
corepack use yarn@latest
yarn init -y
yarn add cypress typescript -D
yarn cypress open --e2e --browser electron
Note that all configuration files have a js
(JavaScript) extension, not a ts
(TypeScript) extension.
Now change to nodeLinker
node-modules
and repeat:
rm -rf cypress cypress.config.js
yarn config set nodeLinker node-modules
yarn install
yarn cypress open --e2e --browser electron
Now TypeScript is detected and Cypress configuration files have a ts
extension.
Cypress Version
14.1.0
Node version
v22.14.0
LTS
Operating System
Ubuntu 24.04.2
LTS
Debug Logs
export DEBUG=cypress:scaffold-config:frameworks
cypress:scaffold-config:frameworks detecting typescript in /tmp/tmp.umKlRs9awY +0ms
cypress:scaffold-config:frameworks error when detecting typescript: unable to resolve package file +0ms
Other
This may be a feature request instead of a bug. In case of it being a feature request, the documentation should be changed to indicate non-support of this configuration.
Related to