title: How to use a module 'fs' in Cypress?
body: <p>I want to import JSON data from my local repository.</p>
  <pre><code>var fs = require('fs');
  var data = fs.readFileSync('./profile.json', 'utf8');
  console.log(data);
  
  ...
  </code></pre>
  <p>However Cypress occurs this error:</p>
  <p><a href="https://i.stack.imgur.com/GYVoW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GYVoW.png" alt="enter image description here" /></a></p>
  <p>Here is my package.json from my cypress project.</p>
  <pre><code>{
    &quot;name&quot;: &quot;cypress_test&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;scripts&quot;: {
      &quot;test&quot;: &quot;npx cypress run&quot;,
      &quot;clean-reports&quot;: &quot;rm -rf cypress/reports&quot;,
      &quot;merge-report&quot;: &quot;npx mochawesome-merge --reportDir cypress/reports/separate-reports cypress/reports/full_report.json&quot;,
      &quot;generate-report&quot;: &quot;npx mochawesome-report-generator --reportDir cypress/reports cypress/reports/full_report.json&quot;,
      &quot;after:tests&quot;: &quot;npm run merge-report; npm run generate-report&quot;,
      &quot;cypress&quot;: &quot;npm run clean-reports; npm run test; npm run after:tests&quot;
    },
    &quot;keywords&quot;: [],
    &quot;type&quot;: &quot;module&quot;,
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;dependencies&quot;: {
      &quot;@cypress/webpack-preprocessor&quot;: &quot;^5.4.1&quot;,
      &quot;cypress&quot;: &quot;^4.11.0&quot;,
      &quot;fs&quot;: &quot;0.0.1-security&quot;,
      &quot;mocha&quot;: &quot;5.2.0&quot;,
      &quot;mochawesome&quot;: &quot;4.1.0&quot;,
      &quot;mochawesome-merge&quot;: &quot;2.0.1&quot;,
      &quot;mochawesome-report-generator&quot;: &quot;4.0.1&quot;,
      &quot;papaparse&quot;: &quot;^5.2.0&quot;,
      &quot;selenium-webdriver&quot;: &quot;^4.0.0-alpha.7&quot;,
      &quot;xlsx&quot;: &quot;^0.16.4&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.11.0&quot;,
      &quot;@babel/preset-env&quot;: &quot;^7.11.0&quot;,
      &quot;babel-loader&quot;: &quot;^8.1.0&quot;,
      &quot;webpack&quot;: &quot;^4.44.1&quot;
    }
  }
  
  </code></pre>
  <p>I don't want to use cy.fixture because I need to use data from json in my 'it test discription'. For example, I want to make tests like this.</p>
  <pre><code>it (datas.data, ()=&gt;{
     ...
  })
  </code></pre>