-
Notifications
You must be signed in to change notification settings - Fork 5
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
Unable to run Cypress, command not found #72
Comments
@willydee, could you somehow share a sample project to reproduce the issue? |
if it's not possible, I can provide you a (not tested) plugin snapshot with the option added and you can check it in your environment. |
I think that's the faster way, since I'm not so familiar yet with setting up a complex project like the one used by our team. I'll happily test a snapshot. |
here is a snapshot: |
Mike, the plugin successfully installed after downgrading Webstorm form 213.x to 212.x. Still I have troubles getting tests to launch; looks like an assumption is made that everything is located relative to the project root; all paths are expanded from there. Our Cypress project is located in a subfolder
If I specify the full path in the
Relevant entry in
Maybe I'm just missing or misunderstanding a config option... |
It's a bit hard for me to calculate all the paths without a sample directory structure.. |
That's what our project structure basically looks like (the relevant parts):
To run Cypress from command line, we do (assuming
Hope this is of help to you. |
Hmm, I've recreated your project structure. |
For completeness (although not involved), the
|
hey @willydee, Also, it seems you should set the cypress project base to this: |
Er, I know this is over a year old. But for what it's worth I had exactly the same problem and your last suggestion @mbolotov to add the program argument I would expect the I'm just happy I have an option to run Cypress tests in an integrated way in the IDE. |
Hi James, Could you share a sample project to reproduce the problem? |
Sure, here: https://github.com/jancellor/cypress-test-yarn I struggled to reproduce at first but I think the key thing is if it is yarn 1 project. I tried first with npm 9 and the config file is found fine. In the run window I either see a single line for npm:
which works fine or multiple lines for yarn:
|
@jancellor |
Apologies must have forgotten to commit (on a different machine now). Repository is updated. Open the project in the IDE, do a yarn install, open the file |
FWIW, most if not all of these could be fixed (I think) by allowing customisation of the command used to invoke Cypress. For example, I use |
Steps to reproduce
Expected result
Cypress should be launched
What happens instead?
Console output
System info
Application versions
Path to Cypress executable
Additional info
Our project structure is perhaps not the usual setup, due to requirements of the CI. Cypress itself is installed in the
node_modules
of project root; the binary is correctly located innode_modules/bin
. But it is not found because that directory is not part of the user's$PATH
, and in Wayland it is notoriously hard to get any additional directory into the session path. Using Node Version Manager triggers similar troubles, so I had to completely ditch it a while ago.WebStorm itself has a setting for its integrated terminal:
☑ Add 'node_modules/.bin' from the project root to $PATH
, so that cypress can be run seamlessly from the built-in terminal. I have no idea why such an option is not generally available in Run/Debug Configurations; IMHO it would be very useful. But maybe a checkbox like that can be integrated into the plugin's configuration?The text was updated successfully, but these errors were encountered: