title: Error on index.js while deploying cloud function
body: <p>I am trying to execute python script using Cloud Function event trigger. My index.js has following code:</p>
  
  <pre><code>var PythonShell = require('python-shell');
  
  PythonShell.run('my_script.py', function (err) {
    if (err) throw err;
    console.log('finished');
  });
  
  exports.processFile = function(event, callback) {
    console.log('Processing file: ' + event.data.name);
    callback();
  };
  
  module.exports = PythonShell;
  </code></pre>
  
  <p>and package.json has following code:</p>
  
  <pre><code>{ 
     "name": "python-shell", 
     "version": "0.4.0", 
     "description": "Run Python scripts from Node.js with simple (but efficient) inter-process communication through stdio", 
     "keywords": [ 
     "python" 
      ], 
     "scripts": { 
      "test": "my_script.py" 
     },
     "dependencies" : {}
  }
  </code></pre>
  
  <p>But the function is not getting created. It is showing below error :
  ERROR:</p>
  
  <pre><code>Deployment failure:
  Function load error: 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 'python-shell'
      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/index.js:7:19)
      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>Please advise how to resolve it ?</p>