This is the code inside `cypress.config.js` `cons...
# help
m
This is the code inside
cypress.config.js
Copy code
const { defineConfig } = require('cypress')

module.exports = defineConfig({
  projectId: 'rnft7f',
  video: false,
  reporter: 'mochawesome',
  reporterOptions: {
    charts: true,
    overwrite: false,
    html: true,
    json: true,
    reportDir: 'cypress/report/mochawesome-report',
  },
  e2e: {
    // We've imported your old cypress plugins here.
    // You may want to clean this up later by importing these.
    setupNodeEvents(on, config) {
      return require('./cypress/plugins/index.js')(on, config)
    },
    baseUrl: 'https://app.astrnt.co/',
    homepageUrl: 'https://app.astrnt.co/', //This is the line  I've just add
    specPattern: 'cypress/e2e/**/*.{feature,features,js,jsx,ts,tsx}'
  },
})
r
That looks fine, if you comment out your changes in
cypress.env.json
is the error thrown still?
f
Yes, still thrown the same error even after delete those line code @rhythmic-guitar-55789
Previously I put global variables in production.env.json not in config.js. I think that might be the problem. I usually setup in production.env.json but after i add it in config.js i received that error. @rhythmic-guitar-55789
r
Yes, variables should go in *.env.json files.
f
already followed this method, but the error still persist @rhythmic-guitar-55789
Do i have to reinstall cypress in the project?
Thank you for your helpful response
r
no worries, I think you might have a syntax error somewhere in your env variables, causing the build error
2 Views