title: Firebase: Error parsing triggers: Cannot find module 'request-promise' simple cloud function
body: <p>Wanted to achieve a firebase only approach to a mobile site, so I decided to make a simple API gateway to my app so I call a cloud function endpoint instead of calling my external API and expose my api keys.</p>
  
  <p>I followed the simple hello world example and was ok.</p>
  
  <p>As soon as I added the request-promise module as stated in Google samples (from translate and from url Shortening example) I cannot go forward. because this arises.</p>
  
  <pre><code>Error parsing triggers: Cannot find module 'request-promise'
  </code></pre>
  
  <p>tested with 'request' module with same results.</p>
  
  <p>My index.js is really simple</p>
  
  <pre><code>const functions = require('firebase-functions');
  const admin = require('firebase-admin');
  admin.initializeApp(functions.config().firebase);
  const request = require('request-promise');
  
  // Create and Deploy Your First Cloud Functions
  // https://firebase.google.com/docs/functions/write-firebase-functions
  
  exports.wxData = functions.https.onRequest((request, response) =&gt; {
   wwurl = "https://mycurrentendpoint.com/apicall.php?key=1234567890&amp;lat="+request.query.lat+"&amp;lon="+request.query.lon;   
   response.send(wwurl);
  });
  </code></pre>
  
  <p>Right now without the  <strong>const request = require('request-promise');</strong> or <strong>const request = require('request');</strong> it deploys ok and display the url to be called. </p>
  
  <p>Really don't know what to do, I already tested creating a new project and just issue this</p>
  
  <p>this is my package.json content:</p>
  
  <pre><code>{
    "name": "functions",
    "description": "Cloud Functions for Firebase",
    "scripts": {
      "serve": "firebase serve --only functions",
      "shell": "firebase experimental:functions:shell",
      "start": "npm run shell",
      "deploy": "firebase deploy --only functions",
      "logs": "firebase functions:log"
    },
    "dependencies": {
      "firebase-admin": "~5.4.2",
      "firebase-functions": "^0.7.1"
    },
    "private": true
  }
  </code></pre>
  
  <p>Is that difficult to implement this in Firebase cloud functions ?</p>
  
  <p>thanks for your help. </p>