-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
yarn 2 support does not work #230
Comments
To reproduce:
(will open GUI - Click on the first test) |
I think this is really a cypress issue: cypress-io/cypress#18072 |
This can be worked around by doing a |
Update for those using 2.3.15 or higher. The In your cypress/plugins/index.js:
And when you call
|
Get this error[1] when using yarn 2 (pnp)
I tried removing the check for 'hasOwnProperty' in resqInjector, but that failed as well, as it looks like webpack did not properly insert the pnp magic in place of the require.resolve[2]
I also tried yarn unplug cypress-react-selector to no avail.
I will work on it a bit more to see if I can find a solution.
[1]
cy.readFile("../../.yarn/cache/resq-npm-1.10.1-c0eb904091-57458eb232.zip/node_modules/resq/dist/index.js") failed while trying to read the file at the following path:
/Users/francis/d/IdeaProjects/product/.yarn/cache/resq-npm-1.10.1-c0eb904091-57458eb232.zip/node_modules/resq/dist/index.js
The following error occurred:
Because this error occurred during a before all hook we are skipping all of the remaining tests.Learn more
View stack trace
Print to console
at (http://localhost:53226/__cypress/runner/cypress_runner.js:159601:29)
From previous event:
at verifyAssertions (http://localhost:53226/__cypress/runner/cypress_runner.js:159593:86)
at Context.readFile (http://localhost:53226/__cypress/runner/cypress_runner.js:159645:15)
From Your Spec Code:
at $Cy.cy. [as readFile] (http://localhost:53226/__cypress/runner/cypress_runner.js:174899:50)
at Context.push.../../.yarn/unplugged/cypress-react-selector-npm-2.3.11-c2cb0b820d/node_modules/cypress-react-selector/src/resqInjector.js.exports.waitForReact (http://localhost:53226/__cypress/src/static/js/0.chunk.js:1088:7)
at (http://localhost:53226/__cypress/runner/cypress_runner.js:173604:16)
at tryCatcher (http://localhost:53226/__cypress/runner/cypress_runner.js:26492:24)
at Promise._settlePromiseFromHandler (http://localhost:53226/__cypress/runner/cypress_runner.js:24427:32)
at Promise._settlePromise (http://localhost:53226/__cypress/runner/cypress_runner.js:24484:19)
at Promise._settlePromiseCtx (http://localhost:53226/__cypress/runner/cypress_runner.js:24521:11)
at _drainQueueStep (http://localhost:53226/__cypress/runner/cypress_runner.js:21203:13)
at _drainQueue (http://localhost:53226/__cypress/runner/cypress_runner.js:21192:10)
[2]
Webpack generated code:
exports.waitForReact = (timeout = 10000, reactRoot) => {
const file = /require.resolve/(/*! resq */ "../../.yarn/cache/resq-npm-1.10.1-c0eb904091-57458eb232.zip/node_modules/resq/dist/index.js");
cy.readFile(file, 'utf8', {
log: false
}).then(script => {
The text was updated successfully, but these errors were encountered: