title: cannot find service account in firebase functions admin sdk
body: <p>I am trying to initialize the firebase admin sdk in my functions folder so that my cloud function can access my database with admin read/write access, but when I try to deploy my functions the following error is returned</p>
  
  <p>Error: Error parsing triggers: Cannot find module '/serviceKey.json'</p>
  
  <p>I have tried running npm install in the functions directory but it hasn't helped.</p>
  
  <p>Here is my package.json file</p>
  
  <pre><code>{
    "name": "functions",
    "description": "Cloud Functions for Firebase",
    "scripts": {
      "serve": "firebase serve --only functions",
      "shell": "firebase functions:shell",
      "start": "npm run shell",
      "deploy": "firebase deploy --only functions",
      "logs": "firebase functions:log"
    },
    "dependencies": {
      "cors": "^2.8.4",
      "express": "^4.16.3",
      "firebase": "^5.3.1",
      "firebase-admin": "^5.13.1",
      "firebase-functions": "^2.0.2"
    },
    "private": true
  }
  </code></pre>
  
  <p>Here is my index.js file</p>
  
  <pre><code>{
      const functions = require('firebase-functions');
      const express = require('express');
  
      const cors = require('cors')({origin: true});
  
      var firebase = require("firebase");
  
  
      var admin = require("firebase-admin");
  
      require("firebase/auth");
      require("firebase/database");
      //require("firebase/firestore");
      //require("firebase/messaging");
      require("firebase/functions");
  
  
      var serviceAccount = require("/serviceKey.json");
  
  
      // Initialize the app with a service account, granting admin 
      privileges
      admin.initializeApp({
        credential: admin.credential.cert(serviceAccount),
        databaseURL: "https://&lt;database name&gt;.firebaseio.com"
      });
  
      const displayqr = express();
      const geturl = express();
  
  
      displayqr.get('/displayqr', (request, response) =&gt; {
           console.log("response sent");
              response.send("testio/qrdisplay.html");
          });
  
  
  
  
       exports.displayqr = functions.https.onRequest(displayqr);
  
  
  
       exports.geturl = functions.https.onCall((email) =&gt; {// get url 
      function
          });
  }
  </code></pre>