strong-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?