You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.
This is particularly problematic in the default Cypress behavior, since we try to pass the typescript option automatically by auto-detecting it. If we fail to find it and don't pass the option, but the user has TypeScript files, it fails at runtime with the above cryptic syntax error.
Desired behavior:
We should error early if attempting to compile a .ts or .tsx file and the typescript option is not set. In the error message, we can make it clear what went wrong and provide remediation options.
How to reproduce:
Create a TypeScript spec (cypress/integration/typescript_spec.js) and add some TypeScript-specific syntax:
interfaceFoo{baz: string}
Run Cypress and it will fail with a syntax error.
The text was updated successfully, but these errors were encountered:
Cypress uses this package under the hood and tries to auto-detect the path to your typescript installation, but it seems that may not work in all cases, so providing the path manually might make it work.
Current behavior:
If you don't pass the
typescript
option, but have TypeScript files, it results in a syntax error.See also this issue comment.
This is particularly problematic in the default Cypress behavior, since we try to pass the
typescript
option automatically by auto-detecting it. If we fail to find it and don't pass the option, but the user has TypeScript files, it fails at runtime with the above cryptic syntax error.Desired behavior:
We should error early if attempting to compile a
.ts
or.tsx
file and thetypescript
option is not set. In the error message, we can make it clear what went wrong and provide remediation options.How to reproduce:
Create a TypeScript spec (
cypress/integration/typescript_spec.js
) and add some TypeScript-specific syntax:Run Cypress and it will fail with a syntax error.
The text was updated successfully, but these errors were encountered: