You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After migrating my project to Yarn PNP, cypress is not able anymore to find cypress-multi-reporters, giving the following error message:
yarn cypress run --browser electron
Could not load reporter by name: cypress-multi-reporters
We searched for the reporter in these paths:
- /src/clients/web/cypress-multi-reporters
- /src/clients/web/node_modules/cypress-multi-reporters
Cypress have a CLI tool that is installed in the project directory and a server that is installed in the user home directory. The custom reported are installed in the project directory.
This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).
Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃
If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label. Thanks for helping us triaging our repository! 🌟
Self-service
Describe the bug
After migrating my project to Yarn PNP, cypress is not able anymore to find cypress-multi-reporters, giving the following error message:
The error we received was:
To reproduce
Setup a project with:
package.json
cypress.json
then run
yarn run cypress:open
Environment
Additional context
Upstream issue on cypress: cypress-io/cypress#18922
Cypress have a CLI tool that is installed in the project directory and a server that is installed in the user home directory. The custom reported are installed in the project directory.
The code that resolves the custom reporters is:
https://github.com/cypress-io/cypress/blob/0b5f451a9bce73bb80db0f2d8e48d8f2ab7b772d/packages/server/lib/reporter.js#L530-L554
I've tried to change this line of code from:
to
but it looks like that the Yarn PNP version of the
require.resolve
function is not passed from the Cypress CLI to the Cypress Server.It looks like that the cypress CLI is creating the server process using the Node child process library here:
https://github.com/cypress-io/cypress/blob/6b15468579b539cd6f6bf3049fdc3ad8a1a414a3/cli/lib/exec/spawn.js#L157
Do you know if there is any way to pass the PNP context to the Node child process?
The text was updated successfully, but these errors were encountered: