Skip to content
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

Can't resolve typescript when using Yarn v2 with PlugNPlay #15241

Closed
johnwiseheart opened this issue Feb 26, 2021 · 1 comment
Closed

Can't resolve typescript when using Yarn v2 with PlugNPlay #15241

johnwiseheart opened this issue Feb 26, 2021 · 1 comment
Labels
type: duplicate This issue or pull request already exists

Comments

@johnwiseheart
Copy link

johnwiseheart commented Feb 26, 2021

Current behavior

When upgrading to Yarn v2 with plug n play, Cypress tests and configuration which were previously working no longer work. Specifically, when running with debug mode, I see

  cypress:server:plugins resolving typescript with options { basedir: '/Users/john/<repo>' } +0ms
  cypress:server:plugins could not resolve typescript, error: Cannot find module 'typescript' from '/Users/john/<repo>' +9ms

even though typescript is present in the project.

I imagine this is probably because the node_modules directory no longer exists with pnp. However, I found https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/util/ts-node.js, and tried using resolve.sync("typescript") myself, which seemed to work - so not sure why cypress is unable to resolve it.

Desired behavior

It should continue working with no issues.

Versions

Broken on 6.5.0, 6.6.0.

@jennifer-shehane
Copy link
Member

Duplicate of #8008

@jennifer-shehane jennifer-shehane marked this as a duplicate of #8008 Feb 26, 2021
@jennifer-shehane jennifer-shehane added the type: duplicate This issue or pull request already exists label Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants