Cannot consume ES module based cypress config when using Yarn 3
See original GitHub issueCurrent behavior
Does not work correctly with cypress.config.ts
containing ES module syntax when using Yarn 3 (does not create node_modules
). I get an error and cannot proceed.
Problem is we try to resolve your TS install from projectRoot
but new versions of yarn install modules in some other place that isn’t in <project>/node_modules
.
We DO detect your bundler and framework correctly when setting up CT, so the logic that we use there should also be used for resolving your TS version.
Desired behavior
It works as you’d expected
Test code to reproduce
https://github.com/lmiller1990/yarn-3-issue-ts
- clone
- make sure you get 3.x when you do
yarn --version
- install
- open cypress CT
Cypress Version
10.3.0
Other
Created from https://github.com/cypress-io/cypress/issues/22071#issuecomment-1180554866
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Cannot consume ES module based cypress config when using Yarn ...
Fast, easy and reliable testing for anything that runs in a browser. - Cannot consume ES module based cypress config when using Yarn...
Read more >TypeScript - Cypress Documentation
Configure tsconfig.json · Open the command palette (Mac: cmd+shift+p , Windows: ctrl+shift+p ) · Type "restart ts" and select the "TypeScript: Restart TS...
Read more >Cypress Module Problem - Gleb Bahmutov
It seems if the application has type: module setting in its package.json , the Cypress plugins that runs in Node and tries to...
Read more >Must use import to load ES Module after creating vuestorefront ...
In your nuxt.config.js file, you made a typo in the modules section. Here is the correct name of the module '@nuxtjs/i18n' // rather...
Read more >Quick Start - Vue.js
If you prefer a plain HTML setup without any build steps, you can use this JSFiddle as ... so we can use Vue...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I haven’t had a chance to look at this in more depth yet. I’m sorry. I don’t think I can look at this during Dec, but I would like to see this triaged and fixed in January. Let me try and bump this one up in priority.
I think I was misleading slightly - the title should not be
ES module based
butTS based cypress config
. I will update it.Basically, yarn 3 + TS isn’t working? I think it’s because we try to load your local TS from
node_modules
, which is not a thing in Yarn 3… digging into the various module problems now (eg https://github.com/cypress-io/cypress/issues/22795) so hopefully can look into this, too.