-
Notifications
You must be signed in to change notification settings - Fork 39
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
Cannot find module 'cypress', Cypress v10, cypress.config.js #423
Comments
Hi Andreas, I hope you are doing well. I have read through your query and understood the issue. Please try to install cypress on the CI env at the project level folder. This should solve the error. The above-mentioned fix should solve the problem, otherwise please reach out to their technical support team. I hope this helps. Thanks! |
Hi @sharutkarsh I have a similar question. We are using Cypress 12. The cypress config file has cypress import like so: import { defineConfig } from "cypress"; Our browserstack.json file clearly mentions the projectId. Do we still need to install Cypress in our CI environment? Is installing Cypress in our CI a prerequisite to browserstack-cypress package? It doesn't appear to be from this repo's readme, but would like to confirm. Thank you for your help! -Swati |
I've noticed that this issue disappears if you include 'cypress' as npm-dependency in browserstack.json |
Hi,
I am trying to run Cypress v10 within Browserstack using this CLI.
Our settings are:
browserstack-cypress-cli
v1.19cypress.config.js
instead of older JSON schemaI took over the info from #342 (comment) that I need to specify
cypress
also in thenpm_dependencies
.My
browserstack.json
config looks like this:but it fails in my CI process with the following traceback:
My
cypress.config.js
looks like this:So it is pretty clear what the issue is: It can not find
cypress
within node modules resolution. Running Cypress locally works fine with the same config.Any help would be appreciated what it could be. I also thought it might be how I specify the
cypress
versions within thebrowserstack.json
. According to https://www.browserstack.com/docs/automate/cypress/supported-versions#supported-cypress-versions the latest might be either 10.3.0 or 10.8.0 (mentioned later on this page).At this point I'm quite sure that the issue is most probably in this CLI, but I'm still not 100% sure.
What do you think? Anyone else here with the same issue? If someone runs Browserstack with Cypress 10 already it would be helpful to know which version of
cypress
you specified in the browserstack config and how your cypress.config.js looks like.Thanks in advance,
Andi
The text was updated successfully, but these errors were encountered: