-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERR_UNKNOWN_FILE_EXTENSION with Typescript config and Yarn 3 / Zero install #24209
Comments
@munkinugget Thank you for posting this issue and attaching a reproducible project. After cloning your project and following your setup instructions, I was able to obtain the same error as you posted. The work around to avoid the problem above is:
I followed the steps above to get the typescript project working with cypress. |
Closing as resolved. If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Dang, I did not catch this before you closed it. I cannot replicate your solution. Would you be willing to share the working tsconfig.json? I'm not sure what I'm doing wrong. |
@munkinugget After going over this issue again it seems as though my solution does not entirely solve the typescript errors associated with cypress in your Yarn 3 project. For the time being it seems as though Yarn 3 is not correctly handling I am looking further into this and hopefully should find a work around for Cypress |
Related issue: issue-19229 |
Hey @munkinugget we have a few issues related to |
Summary: Update Cypress from 9.x to 12.x, and perform all relevant migrations. Changes are the results of [10.0 migration](https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-100), [11.0 migration](https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-110), and [12.0 migration](https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-120) guides. The reason for using `cypress.config.mjs` instead of `cypress.config.ts` is that the latter is not working with Yarn 3 yet ([1](cypress-io/cypress#24209), [2](cypress-io/cypress#22747), [3](cypress-io/cypress#25958)). If that changes, we can revisit. Notably, one of the larger changes is that test isolation is now on by default. This means the page is refreshed between each test rather than each suite, so some tests needed to be reconfigured to work with that paradigm. Cypress' UI has gotten a major refresh as well, so I changed the commands to account for it. Relevant Issues: N/A Type of change: /kind cleanup Test Plan: Follow instructions in `src/ui/cypress/README.md`. In particular, try `yarn run cypress:run:chrome`. All of the tests should pass, totally headlessly. Signed-off-by: Nick Lanam <[email protected]>
Current behavior
This project is a monorepo using Yarn 3, with PnP / zero install, with yarn workspaces. In this environment the minimum settings suggested by your documentation to configure and run cypress with Typescript fails with the following errors:
In the console:
Within the Cypress UI (Stack trace):
Desired behavior
Cypress should launch without this error.
Test code to reproduce
You will need a Node ^16 environment with Yarn installed.
Clone my repo:
https://github.com/munkinugget/cypress-ts-repro
Run the yarn command once to insure everything is running ok:
yarn
Run the following command in the repo directory:
yarn test
It will launch cypress, and you should see the error messages in the console and in the app UI.
Cypress Version
10.9.0
Node version
16.17.0
Operating System
macOS 12.6
Debug Logs
Other
I've been troubleshooting this issue for a while now and can't seem to move past this. I'm trying to move my project to Yarn PnP and zero installs, and this is the last hangup. Any help or insight would be greatly appreciated.
The text was updated successfully, but these errors were encountered: