-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
"lib/project requires a projectRoot" #756
Comments
I ran into the same Error. Is it necessary to put it up into a Github project for it to run? |
@blodgettza can you list what you have done to recreate the bug
|
I downloaded the zip file from: https://docs.cypress.io/guides/getting-started/installing-cypress.html#Direct-Download I then followed the instructions here: https://docs.cypress.io/guides/core-concepts/dashboard-service.html It's when I try to run cypress at step 10 that I get the error. Do I need to run cypress from a certain folder? I tried both in the root of the project and in the generated cypress folder. Cypress itself is in "C:\apps\cypress" and my project is in "C:\src\myproject\src" |
I too have this same issue. I created a project at dashboard.cypress.io and I have the ProjectID and KEY. I ran the 'cypress run --record - -key xxxxx' and get the error above. |
ping @bahmutov |
Hmm, I have not investigated this on Windows. And you have used |
Hi! @bahmutov But now it says; |
You are all getting this error because you're using the binary Cypress application directly as opposed to going through the The NPM package ends up parsing and passing the arguments to the binary. While it's possible to use the binary directly, it's not documented and its use outside of the CLI is not supported. There are a great many things we do in the CLI to normalize arguments amongst other things (like start All you all have to do is follow our Installing Cypress and Getting Started guides. You cannot record to the Dashboard without using the NPM module. Downloading Cypress manually (from the website) and unzipping it is fine when you're first experimenting with it - but to actually adopt it on your project should be done via Doing it this way will ensure you run through the CLI and everything will just work. There is not an actual issue here, so I'm closing. |
@jennifer-shehane we should probably mention in the docs that recording to the Dashboard requires use of the NPM package and cannot be done outside of it. Since Cypress records to the Dashboard primarily in CI it really does not make sense to try to use it outside of the NPM environment. I get that there is a small use case, but it's not worth us trying to support how to do it via the binary directly. When we code Cypress we do not anticipate it being used this way and there are likely other issues that will arise running it outside of the CLI. |
@brian-mann Yes, this would fall under this issue in the documentation cypress-io/cypress-documentation#427 |
@bahmutov and @jennifer-shehane we may also want to warn the user when they attempt to invoke the binary directly with arguments as opposed to going through the CLI. We can detect that by passing a |
Yes, we should do this detection and warning
…Sent from my iPhone
On Apr 12, 2018, at 15:44, Brian Mann ***@***.***> wrote:
@bahmutov and @jennifer-shehane we may also want to warn the user when they attempt to invoke the binary directly with arguments as opposed to going through the CLI.
We can detect that by passing a --run-from-cli argument to the binary, and when absent we know it's been invoked incorrectly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Is this a Feature or Bug?
Error
Current behavior:
When I try and run
cypress run --record --key xxxxxx-xxxxxx-xxxxxx-xxxxxx
I get the error:Error: Instantiating lib/project requires a projectRoot!
Desired behavior:
I would like to record the test so I can view the results in the browser Dashboard
How to reproduce:
Follow the installation process when downloading the zip file and try to cypress run.
Test code:
Additional Info (images, stack traces, etc)
The text was updated successfully, but these errors were encountered: