title: Why won't local modules load using Cloud Functions for Firebase
body: <p>I've found out that Cloud Functions for Firebase uses the <code>package.json</code> file to load <a href="https://firebase.google.com/docs/functions/handle-dependencies" rel="nofollow noreferrer">dependencies</a>, but I get an error when calling my functions:</p>
  
  <pre><code>Code in file index.js can't be loaded.
  Did you list all required modules in the package.json dependencies?
  Detailed stack trace: Error: Cannot find module 'express'
      at Function.Module._resolveFilename (module.js:469:15)
      at Function.Module._load (module.js:417:25)
      at Module.require (module.js:497:17)
      at require (internal/module.js:20:19)
      at Object.&lt;anonymous&gt; (/user_code/rest_api.js:2:17)
      at Module._compile (module.js:570:32)
      at Object.Module._extensions..js (module.js:579:10)
      at Module.load (module.js:487:32)
      at tryModuleLoad (module.js:446:12)
      at Function.Module._load (module.js:438:3)
  </code></pre>
  
  <p>Here is my <code>index.js</code> file:</p>
  
  <pre><code>const processor = require('./processor.js');
  
  exports.processThing = functions.https.onRequest((req, res) =&gt; {
      let param = req.body.param;
      processor.process(param);
  });
  </code></pre>