Tell us what’s happening:
When entering the URL of a working project to run the tests, the following error is generated in the browser console: “DataCloneError: Error executing ‘postMessage’ on ‘Window’: The URL object could not be cloned.”
The repository with the code is as follows: https://github.com/adrielcaro25/Set-up-a-Template-Engine
A URL for the project deployed on Vercel is: https://set-up-a-template-engine.vercel.app/
Please, your guidance.
Your code so far
'use strict';
require('dotenv').config();
const express = require('express');
const myDB = require('./connection');
const fccTesting = require('./freeCodeCamp/fcctesting.js');
const app = express();
app.set('view engine', 'pug');
app.set('views', './views/pug');
fccTesting(app); // For fCC testing purposes
app.use('/public', express.static(process.cwd() + '/public'));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.route('/').get((req, res) => {
res.render('index');
});
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log(`Listening on port ${PORT}`);
});
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0
Challenge Information:
Advanced Node and Express - Set up a Template Engine