{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless-google-cloudfunctions/issues/5","repository_url":"https://api.github.com/repos/serverless/serverless-google-cloudfunctions","labels_url":"https://api.github.com/repos/serverless/serverless-google-cloudfunctions/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless-google-cloudfunctions/issues/5/comments","events_url":"https://api.github.com/repos/serverless/serverless-google-cloudfunctions/issues/5/events","html_url":"https://github.com/serverless/serverless-google-cloudfunctions/issues/5","id":188715309,"number":5,"title":"The problem with package.json and node_modules","user":{"login":"pmuens","id":1606004,"avatar_url":"https://avatars0.githubusercontent.com/u/1606004?v=3","gravatar_id":"","url":"https://api.github.com/users/pmuens","html_url":"https://github.com/pmuens","followers_url":"https://api.github.com/users/pmuens/followers","following_url":"https://api.github.com/users/pmuens/following{/other_user}","gists_url":"https://api.github.com/users/pmuens/gists{/gist_id}","starred_url":"https://api.github.com/users/pmuens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmuens/subscriptions","organizations_url":"https://api.github.com/users/pmuens/orgs","repos_url":"https://api.github.com/users/pmuens/repos","events_url":"https://api.github.com/users/pmuens/events{/privacy}","received_events_url":"https://api.github.com/users/pmuens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-11T09:08:12Z","updated_at":"2017-04-03T08:01:42Z","closed_at":null,"body":"This is a Google provider related problem I encountered during usage.\r\n\r\nLet's pretend a user wants to use the Google Provider implementation. He would create (or download) a service. He would add a `package.json` file to his service directory so that he can install all the necessary packages and of course the Serverless `google` provider plugin (which is a npm package as well).\r\n\r\nNow here are some minor problems we have to tackle:\r\n\r\nThe `google-cloud` and `googleapis` packages are huge (right now we include everything so that the developer has access to all Google Cloud service he needs).\r\n**Solution:**\r\nWe can easily reduce this and only include the npm packages which are really needed for the deployment process (e.g. `storage` and `functions`, etc.). The user has to add the Google pacakges he need by hand to his service. Furthermore I've excluded the `package.json` file and `node_modules` directory in the boilerplate (see below).\r\n\r\nThe Google \"handler\" concept works a follows. The root directory needs a file named `index.js`, `function.js` or a `package.json` (with an entrypoint defined). This is a problem right now as the `package.json` is taken which has the Google Provider plugin as a `dependency`. Completely ignoring the `index.js` or `function.js` of the service (if the user won't define it in the `package.json` which is not yet done by default).\r\n**Solution:**\r\nRight now I've excluded the `package.json` and `node_modules` directory in the boilerplate (see: https://github.com/serverless/boilerplate-googlecloudfunctions-nodejs/pull/2/files). This makes sure that the plugin works as expected. However `package.json` files or `node_modules` directories on the root level are currently not supported because of this. The user needs to add a directory, create a new `package.json` and add all the dependencies he wants to use for his service there.\r\nI hope that this is understandable. Otherwise please let me know.\r\nAs already said. This is a problem currently only the Google implementation has and is not that super critical at the time of writing (although this might change once the Google Cloud Functions service is open for everyone and larger projects are developed) but definitely needs attention soon.\r\n\r\n/cc @serverless/team "},"comment":{"url":"https://api.github.com/repos/serverless/serverless-google-cloudfunctions/issues/comments/291074089","html_url":"https://github.com/serverless/serverless-google-cloudfunctions/issues/5#issuecomment-291074089","issue_url":"https://api.github.com/repos/serverless/serverless-google-cloudfunctions/issues/5","id":291074089,"user":{"login":"codepreneur","id":3421858,"avatar_url":"https://avatars2.githubusercontent.com/u/3421858?v=3","gravatar_id":"","url":"https://api.github.com/users/codepreneur","html_url":"https://github.com/codepreneur","followers_url":"https://api.github.com/users/codepreneur/followers","following_url":"https://api.github.com/users/codepreneur/following{/other_user}","gists_url":"https://api.github.com/users/codepreneur/gists{/gist_id}","starred_url":"https://api.github.com/users/codepreneur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codepreneur/subscriptions","organizations_url":"https://api.github.com/users/codepreneur/orgs","repos_url":"https://api.github.com/users/codepreneur/repos","events_url":"https://api.github.com/users/codepreneur/events{/privacy}","received_events_url":"https://api.github.com/users/codepreneur/received_events","type":"User","site_admin":false},"created_at":"2017-04-03T08:01:42Z","updated_at":"2017-04-03T08:01:42Z","body":"@pmuens: http://forum.serverless.com/t/tailing-logs-for-google-functions-not-possible/1616"}}
{"actor":{"display_login":"codepreneur"}}