Cypress forcing install of @types/node
to specific version (18.17.5)
#28473
Labels
type: typings
Issue related to Cypress types (for TypeScript)
Current behavior
Cypress is currently being shipped with a dependency on
@types/node^18.17.5
(not adevDependency
).However, Cypress lists engine compatibility with 16, 18, or 20.
The most recent change came from #27715 and shipped in cypress v13.2. The changelog explicitly states:
So, I think Cypress should not be forcing users to install such a strict version of these types, if at all.
(On our end, this is causing some issues with our builds + package deduplication.)
Desired behavior
Don't force such a specific version of
@types/node
.Some possible implementations:
devDependency
in package.json, so not sure why it's making it into the distribution)"@types/node": "*"
(this is pretty common; it's how ~90% of our current packages handle it)^16.0.0 || ^18.0.0 || >=20.0.0
to match engine compatibliity^18.0.0
Test code to reproduce
n/a
Cypress Version
13.16.1
Node version
18.16
Operating System
all
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: