question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot consume ES module based cypress config when using Yarn 3

See original GitHub issue

Current 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:open
  • Created a year ago
  • Reactions:9
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
lmiller1990commented, Dec 7, 2022

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.

2reactions
lmiller1990commented, Sep 1, 2022

I think I was misleading slightly - the title should not be ES module based but TS 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found