prehistoric-restaurant-72560
06/27/2022, 1:46 PMYour configFile is invalid: ***/cypress.config.ts
It threw an error when required, check the stack trace below:
Error: Cannot find module 'esbuild'
Require stack:
- /builds/***/node_modules/@bahmutov/cypress-esbuild-preprocessor/src/index.js
- /builds/A7ZaeUHb/0/gog-QA/e2e-finapp-sales-summary/cypress.config.ts
- /root/.cache/Cypress/10.2.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/run_require_async_child.js
.
.
.
prehistoric-restaurant-72560
06/27/2022, 1:46 PMimport { defineConfig } from "cypress";
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import createEsbuildPlugin from "@badeball/cypress-cucumber-preprocessor/esbuild";
async function setupNodeEvents(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions): Promise<Cypress.PluginConfigOptions> {
await addCucumberPreprocessorPlugin(on, config);
on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin(config)],
})
);
// Make sure to return the config object as it might have been modified by the plugin.
return config;
}
export default defineConfig({
e2e: {
specPattern: "**/*.feature",
supportFile: false,
baseUrl: "https://finapp.gog-staging.com",
setupNodeEvents,
retries: {
runMode: 2,
openMode: 0
}
},
});
prehistoric-restaurant-72560
06/27/2022, 1:47 PMimport { defineConfig } from "cypress";
import createBundler from "@bahmutov#6775/cypress-esbuild-preprocessor";
import { addCucumberPreprocessorPlugin } from "@badeball#5954/cypress-cucumber-preprocessor";
import createEsbuildPlugin from "@badeball#5954/cypress-cucumber-preprocessor/esbuild";
async function setupNodeEvents(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions): Promise<Cypress.PluginConfigOptions> {
await addCucumberPreprocessorPlugin(on, config);
on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin(config)],
})
);
// Make sure to return the config object as it might have been modified by the plugin.
return config;
}
export default defineConfig({
e2e: {
specPattern: "**/*.feature",
supportFile: false,
baseUrl: "https://finapp.gog-staging.com",
setupNodeEvents,
retries: {
runMode: 2,
openMode: 0
}
},
});