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
Cypress dependencies resolved using the user's tsconfig.json rules #14646
Comments
@Andarist Could you provide a repo with an example of the conflict resolution of deps situation you're describing? |
Sure thing - I've added a repro case to the main post, you can check it out here: https://github.com/Andarist/cypress-ts-base-url-problem |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
I upgraded Cypress to v12 in the provided repro and I can confirm that the issue is still there: Andarist/cypress-ts-base-url-problem@37288ce |
I have replicated your problem in the latest version of Cypress and will forward this ticket to the appropriate team. They will evaluate the priority of this ticket and consider their capacity to pick it up. Please note that this does not guarantee that this issue will be resolved. |
Current behavior
Cypress server installs
ts-node
through this:cypress/packages/server/lib/plugins/child/run_plugins.js
Lines 168 to 169 in 1fcbd5b
and this affects file resolution logic when running Cypress. For many situations, this is desirable and works just fine without the user having to configure stuff automatically.
However, this can also affect how things from within Cypress are resolved and this can end up with a very hard to debug problem - especially given the fact that it can happen at random at any time (after adding some files to the project or when installing a new version of Cypress).
Desired behavior
This should be seamless for the user -
tsconfig.json
in the user's project should not influence the resolution of Cypress' dependencies.Test code to reproduce
tsconfig.json
project structure
Given this structure, any
require('debug')
- from within the project, itsnode_modules
but also from within Cypress directory that lives completely outside of the project - will resolve to<root>/source/debug.ts
and this might crash at runtime as you expect completely different interface of the'debug'
module than the one that is exported by the localdebug.ts
.This is not exclusive to
debug
module - any dependency of yours is error-prone to this if only the user creates a filename conflicting with a node module pkg name.Here you can find a repro case presenting the issue:
https://github.com/Andarist/cypress-ts-base-url-problem
just run this to see the error:
Versions
6.3.0
The text was updated successfully, but these errors were encountered: