title: How do I import the functions from a one firebase project into another firebase project?
body: <p>I have 2 firebase functions project: <code>prod</code> and <code>infra</code>. <code>infra</code> needs all the functions of <code>prod</code> and has some more of its own (i.e. <code>infra</code> is a strict superset of <code>prod</code>). The directory structure is roughly:</p>
  <pre><code>|---&gt; myDirectory
     |---&gt; infra
     | |---&gt; functions
     |   |---&gt; src
     |     |---&gt; index.js          // infra is TS
     |---&gt; prod
       |---&gt; functions
         |---&gt; index.js            // prod is JS
  </code></pre>
  <p>How do you import functions from <code>prod</code> into <code>infra</code>? I've tried</p>
  <pre><code>    // myDirectory/infra/functions/index.js
      const { functionA } = require('../../prod/functions/index.js');
      exports.functionA = functionA;
  </code></pre>
  <p>This works fine on emulators, but I'm getting this error when deploying:</p>
  <pre><code>validateEventDocument 
  Provided module can't be loaded. 
  Did you list all required modules in the package.json dependencies? 
  Detailed stack trace: Error: Cannot find module '../../../prod/functions/index.js' 
  </code></pre>