title: Firebase functions failed to deploy
body: <p>I'm getting the following error whenever I deploy my firebase functions</p>
  <p>Error: Error occurred while parsing your function triggers.</p>
  <pre><code>Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No &quot;exports&quot; main defined in D:\Proyectos\socialapp-functions\functions\node_modules\firebase\package.json
      at throwExportsNotFound (internal/modules/esm/resolve.js:285:9)
      at packageExportsResolve (internal/modules/esm/resolve.js:508:3)
      at resolveExports (internal/modules/cjs/loader.js:450:36)
      at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
      at Function.Module._load (internal/modules/cjs/loader.js:746:27)
      at Module.require (internal/modules/cjs/loader.js:974:19)
      at require (internal/modules/cjs/helpers.js:92:18)
      at Object.&lt;anonymous&gt; (D:\Proyectos\socialapp-functions\functions\index.js:4:18)
      at Module._compile (internal/modules/cjs/loader.js:1085:14)
  </code></pre>
  <p>My index.js</p>
  <pre><code>const app = require(&quot;express&quot;)();
  const firebase = require('firebase');
  const functions = require(&quot;firebase-functions&quot;);
  const admin = require(&quot;firebase-admin&quot;);
  
  const firebaseConfig = {...};
  
  firebase.initializeApp(firebaseConfig);
  
  app.post('/signup', (req, res) =&gt; {
  
  const newUser = {
      email: req.body.email,
      password: req.body.password,
      confirmPassword: req.body.confirmPassword,
      handle: req.body.handle
  };
  
  firebase
          .auth()
          .createUserWithEmailAndPassword(newUser.email, newUser.password)
          .then(data =&gt; {
              return res.status(201).json({
                  message: `User ${newUser.handle} created successfully`
              });
          })
          .catch(err =&gt; {
              console.error(err);
              return res.status(500).json({
                  error: err.code
              });
          })
  
  })
  
  exports.api = functions.https.onRequest(app);
  </code></pre>
  <p>Edit: I'm also adding my package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;functions&quot;,
    &quot;description&quot;: &quot;Cloud Functions for Firebase&quot;,
    &quot;scripts&quot;: {
      &quot;serve&quot;: &quot;firebase emulators:start --only functions&quot;,
      &quot;shell&quot;: &quot;firebase functions:shell&quot;,
      &quot;start&quot;: &quot;npm run shell&quot;,
      &quot;deploy&quot;: &quot;firebase deploy --only functions&quot;,
      &quot;logs&quot;: &quot;firebase functions:log&quot;
    },
    &quot;engines&quot;: {
      &quot;node&quot;: &quot;16&quot;
    },
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;dependencies&quot;: {
      &quot;express&quot;: &quot;^4.17.3&quot;,
      &quot;firebase&quot;: &quot;^9.6.9&quot;,
      &quot;firebase-admin&quot;: &quot;^10.0.2&quot;,
      &quot;firebase-functions&quot;: &quot;^3.19.0&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;firebase-functions-test&quot;: &quot;^0.2.0&quot;
    },
    &quot;private&quot;: true
  }
  </code></pre>
  <p>I'm pretty much new on using Firebase with Express.js, I'll gladly appreciate any help. Thanks in advance.</p>
  <p>Edit. Added my definition for firebase functions container using express.js exports.api = functions.https.onRequest(app);</p>