nutritious-waitress-23155
12/04/2022, 9:59 PMgreat-oil-15113
12/04/2022, 11:14 PMflaky-airport-12178
12/04/2022, 11:56 PMbitter-fountain-36713
12/05/2022, 12:20 AMgreat-oil-15113
12/05/2022, 12:56 AMgreat-oil-15113
12/05/2022, 4:59 AMnpx cypress run --record --key **** --e2e --reporter cypress-multi-reporters --reporter-options configFile=reporter-config.json
. but the pipeline complains about project id missing This project is missing the projectId inside of: cypress.config.ts
. what did i do wrong?limited-librarian-92780
12/05/2022, 6:23 AMlimited-librarian-92780
12/05/2022, 6:23 AMlimited-librarian-92780
12/05/2022, 6:24 AMstraight-chef-47891
12/05/2022, 6:30 AMCYPRESS_ENVIRONMENT=local npx cypress open
. Then I try to pass that unto my cypress.config.ts
file:
const env = Cypress.env('ENVIRONMENT');
But I get an error `ReferenceError: Cypress `is not definedfresh-doctor-14925
12/05/2022, 8:51 AMCypress.env('ENVIRONMENT')
within your specs, but cypress.config.ts
runs in node as part of the setup process, so you don't have access to the Cypress
object yet
If you need to get it in there, you can reach it with process.env.CYPRESS_ENVIRONMENT
, though at that point I'd probably just pass it in as ENVIRONMENT
.
You can also take that variable and assign it to so that you can access it in Cypress.env later:
setupNodeEvents(_on, config) {
config.env.ENVIRONMENT = process.env.ENVIRONMENT;
return config;
},
Hope that helps!quiet-answer-70986
12/05/2022, 8:57 AMfresh-doctor-14925
12/05/2022, 9:18 AMstrong-knife-80597
12/05/2022, 10:38 AMzsh
Cannot find coverage file /Users/'...'/Documents/github/checkout/.nyc_output/out.json
Skipping coverage report
Again, it works just fine with webpack-dev-server.
The folder structure is (when using webpack-dev-server) as follows:
cypress-coverage/ <- it's a folder above dist/
dist/
express.js
all my bundled files
The express server looks like this:
js
const express = require('express');
const path = require('path');
const app = express();
app.set('view engine', 'ejs');
const port = process.env.PORT || 8080;
const basename = '/page/checkout';
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.disable('x-powered-by');
app.use(basename, express.static(__dirname));
app.get('*', (req, res) => {
res.status(200).render(path.join(__dirname, 'index.ejs'));
});
app.post('*', (req, res) => {
res.status(200).render(path.join(__dirname, 'index.ejs'));
});
app.listen(port, () => {
// eslint-disable-next-line no-console
console.info(`Listening on port ${port}...`);
});
Any ideas what could be the issue?straight-chef-47891
12/05/2022, 10:42 AMhelpful-hairdresser-46183
12/05/2022, 11:09 AMhelpful-hairdresser-46183
12/05/2022, 11:10 AMgray-kilobyte-89541
12/05/2022, 11:36 AMgray-kilobyte-89541
12/05/2022, 11:37 AM@cypress/grep
package (instead of cypress-grep
)helpful-hairdresser-46183
12/05/2022, 11:41 AMhelpful-hairdresser-46183
12/05/2022, 11:47 AMhelpful-hairdresser-46183
12/05/2022, 12:03 PMfresh-doctor-14925
12/05/2022, 12:04 PMnutritious-analyst-96582
12/05/2022, 12:04 PMhelpful-hairdresser-46183
12/05/2022, 12:06 PMstrong-knife-80597
12/05/2022, 12:18 PMbest-flower-17510
12/05/2022, 2:25 PMhelpful-hairdresser-46183
12/05/2022, 4:23 PMgray-kilobyte-89541
12/05/2022, 4:42 PMcolossal-match-42171
12/05/2022, 5:47 PM