cypress errors

 



Remove from the command.js file 


const cypress = require("cypress");

import { cli } from 'cypress';


When the page not loading due to cash


module.exports = defineConfig({
  ...
    ...
    numTestsKeptInMemory:0
  },
});


When install 

cypress-mochawesome-reporter




use force to install it as follows
 

npm i --save-dev cypress-mochawesome-reporter --force




Json Not working with typescript 

to fix add the following to tsconfig file 


{
  "compilerOptions": {
   ...
    "resolveJsonModule": true, <-------------------
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true, // use json import
  },
 
}

----------------------------------------------------------------------------------------------------------------

if got the following error >  install again

npm install cypress --save-dev