-
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
Your configFile is invalid: /builds/testverse/SwagLabs-Cypress/cypress.config.js #30242
Comments
@Shady1997 Is your config file invalid? You didn't share the contents of that file, so I can't be sure. |
// cypress.config.js
const { defineConfig } = require('cypress');
module.exports = defineConfig({
reporter: 'cypress-mochawesome-reporter',
reporterOptions: {
reportDir: 'cypress/reports', // Directory where the report will be saved
charts: true,
reportPageTitle: 'SwagLabs',
videoOnFailOnly: true,
saveAllAttempts: false,
embeddedScreenshots: true,
inlineAssets: true,
overwrite: true, // Do not overwrite previous reports
html: true, // Generate an HTML report
json: false, // Optionally, also generate a JSON report
timestamp: 'short', // Adds a timestamp to the report file name
},
e2e: {
baseUrl: 'https://www.saucedemo.com/v1/index.html', // Set your base URL
video: true, // Enable video recording
supportFile: false, // Disable support file if not needed
specPattern: 'cypress/e2e/**/*.js', // Adjust this to match your test files
screenshotOnRunFailure: true, // Take screenshot on failure
defaultCommandTimeout: 10000, // Increase timeout as needed
setupNodeEvents(on, config) {
// implement node event listeners here
require('cypress-mochawesome-reporter/plugin')(on);
},
},
}); and this the screenshot after list files to confirm config file included properly |
@Shady1997 I think the problem here may be that |
|
This is the error that you will get if npm install cypress --save-dev and in
Then you include the following files in your commit to the GitLab repo:
Your workflow should include npm ci to install Cypress into your See https://docs.cypress.io/guides/continuous-integration/gitlab-ci for GitLab examples. For "how-to" type support you can connect to the Cypress technical community on Discord Your problem does not seem to be a bug in Cypress. It looks like a configuration error. |
Did you try the previous suggestions and were they successful? |
Current behavior
Running cypress on gitlab pipeline show the following error:
It threw an error when required, check the stack trace below:
Desired behavior
No response
Test code to reproduce
Require stack:
Cypress Version
[email protected]
Node version
20.17.0-1nodesource1
Operating System
ubuntu:latest
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: