title: How to fix "Cannot find module 'fs-extra' - error" When deploying cypress files into jenkins?
body: <p>I am using plugins in cypress and referred to <a href="https://docs.cypress.io/api/plugins/configuration-api.html#Usage" rel="nofollow noreferrer">https://docs.cypress.io/api/plugins/configuration-api.html#Usage</a>. When we deploy them into jenkins, I am getting </p>
  
  <pre><code> `pluginsFile` is set to `/e2e/cypress/plugins/index.js`, but either the file is missing, it contains a syntax error, or threw an error when required. The `pluginsFile` must be a `.js` or `.coffee` file.
  
  Please fix this, or set `pluginsFile` to `false` if a plugins file is not necessary for your project.[39m
  
  Error: Cannot find module 'fs-extra'
  </code></pre>
  
  <p>I did go through a few threads which manually asks you to download the fs-extra in node_module. I did that and the dependency has been automatically added into the package.json file. However, the build fails. The code runs perfectly when you run locally and all the test passes. However, this fails when the deployed into jenkins. </p>
  
  <pre><code>
  // promisified fs module
  const fs = require('fs-extra')
  const path = require('path')
  
  function getConfigurationByFile (file) {
    const pathToConfigFile = path.resolve('cypress', 'config', `${file}.json`)
  
    return fs.readJson(pathToConfigFile)
  }
  
  module.exports = (on, config) =&gt; {
    // `on` is used to hook into various events Cypress emits
    // `config` is the resolved Cypress config
    // accept a configFile value or use development by default
   const file = config.env.configFile || 'environment-2'
  
   return getConfigurationByFile(file)
  
  }
  </code></pre>
  
  <p>The code should deploy successfully on Jenkins, however, evening installing it locally on node_module doesn't work. Can somebody help in figuring out what I am missing, please?</p>