{"action":"created","issue":{"url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/295","repository_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack","labels_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/295/labels{/name}","comments_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/295/comments","events_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/295/events","html_url":"https://github.com/serverless-heaven/serverless-webpack/issues/295","id":279950756,"number":295,"title":"Deployment missing git packages","user":{"login":"garyrutland","id":3715101,"avatar_url":"https://avatars0.githubusercontent.com/u/3715101?v=4","gravatar_id":"","url":"https://api.github.com/users/garyrutland","html_url":"https://github.com/garyrutland","followers_url":"https://api.github.com/users/garyrutland/followers","following_url":"https://api.github.com/users/garyrutland/following{/other_user}","gists_url":"https://api.github.com/users/garyrutland/gists{/gist_id}","starred_url":"https://api.github.com/users/garyrutland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyrutland/subscriptions","organizations_url":"https://api.github.com/users/garyrutland/orgs","repos_url":"https://api.github.com/users/garyrutland/repos","events_url":"https://api.github.com/users/garyrutland/events{/privacy}","received_events_url":"https://api.github.com/users/garyrutland/received_events","type":"User","site_admin":false},"labels":[{"id":698852254,"url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/labels/issue/under-investigation","name":"issue/under-investigation","color":"e99695","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2017-12-06T23:58:28Z","updated_at":"2018-02-06T10:22:16Z","closed_at":"2017-12-07T11:44:46Z","author_association":"NONE","body":"# This is a Bug Report\r\n\r\n## Description\r\n\r\nGit packages not being included on deployment. \r\nIn `package.json` I have a package included via git `\"my-package\": \"git+ssh://git@my-git-location.com/my-git-package.git#master\"`.\r\nThis has been working fine for months but all of a sudden it would seem that my package is not being bundled on deployment, but working fine when invoking locally.\r\n\r\nIf I download the function from Lambda I can see that my package is missing from the `node_modules` folder.\r\n\r\n## Config\r\n\r\n`.babelrc`\r\n```\r\n{\r\n  \"plugins\": [\r\n    \"transform-runtime\"\r\n  ],\r\n  \"presets\": [\r\n    \"es2015\",\r\n    \"stage-3\"\r\n  ]\r\n}\r\n\r\n```\r\n\r\n`serverless.yml`\r\n```\r\n...\r\nplugins:\r\n  - serverless-webpack\r\n\r\ncustom:\r\n  webpackIncludeModules: true\r\n...\r\n```\r\n\r\n`webpack.config.js`\r\n```\r\nconst slsw = require('serverless-webpack');\r\nconst nodeExternals = require('webpack-node-externals');\r\n\r\nmodule.exports = {\r\n  entry: slsw.lib.entries,\r\n  target: 'node',\r\n  // Since 'aws-sdk' is not compatible with webpack,\r\n  // we exclude all node dependencies\r\n  externals: [nodeExternals()],\r\n  // Run babel on all .js files and skip those in node_modules\r\n  module: {\r\n    rules: [{\r\n      test: /\\.js$/,\r\n      loader: 'babel-loader',\r\n      include: __dirname,\r\n      exclude: /node_modules/,\r\n    }],\r\n  },\r\n};\r\n```\r\n\r\n## Additional Data\r\n\r\n* ***Serverless-Webpack Version you're using***: 4.1.0\r\n* ***Webpack version you're using***: 3.10.0\r\n* ***Serverless Framework Version you're using***: 1.24.1\r\n* ***Operating System***: OSX\r\n\r\n```\r\n$ serverless deploy --stage=##REMOVED##\r\nServerless: Bundling with Webpack...\r\nTime: 600ms\r\n          Asset     Size  Chunks             Chunk Names\r\nhandlers/get.js  5.47 kB       0  [emitted]  handlers/get\r\n   [0] ./handlers/get.js 2.54 kB {0} [built]\r\n   [1] external \"babel-runtime/regenerator\" 42 bytes {0} [not cacheable]\r\n   [2] external \"babel-runtime/helpers/asyncToGenerator\" 42 bytes {0} [not cacheable]\r\n   [3] external \"aws-sdk\" 42 bytes {0} [not cacheable]\r\n   [4] external \"my-package\" 42 bytes {0} [not cacheable]\r\nServerless: Package lock found - Using locked versions\r\nServerless: Packing external modules: babel-runtime@^6.26.0, aws-sdk@^2.165.0, git+ssh://git@my-git-location.com/my-git-package.git#master\r\nServerless: Packaging service...\r\nServerless: Uploading CloudFormation file to S3...\r\nServerless: Uploading artifacts...\r\nServerless: Validating template...\r\nServerless: Updating Stack...\r\nServerless: Checking Stack update progress...\r\n..........\r\nServerless: Stack update finished...\r\nService Information\r\nservice: ###REMOVED###\r\nstage: ###REMOVED###\r\nregion: ###REMOVED###\r\nstack: ###REMOVED###\r\napi keys:\r\n  None\r\nendpoints:\r\n  GET - ###REMOVED###\r\nfunctions:\r\n  get: ###REMOVED###\r\nServerless: Removing old service versions...\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/comments/363377706","html_url":"https://github.com/serverless-heaven/serverless-webpack/issues/295#issuecomment-363377706","issue_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/295","id":363377706,"user":{"login":"HyperBrain","id":5524702,"avatar_url":"https://avatars3.githubusercontent.com/u/5524702?v=4","gravatar_id":"","url":"https://api.github.com/users/HyperBrain","html_url":"https://github.com/HyperBrain","followers_url":"https://api.github.com/users/HyperBrain/followers","following_url":"https://api.github.com/users/HyperBrain/following{/other_user}","gists_url":"https://api.github.com/users/HyperBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/HyperBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyperBrain/subscriptions","organizations_url":"https://api.github.com/users/HyperBrain/orgs","repos_url":"https://api.github.com/users/HyperBrain/repos","events_url":"https://api.github.com/users/HyperBrain/events{/privacy}","received_events_url":"https://api.github.com/users/HyperBrain/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T10:22:15Z","updated_at":"2018-02-06T10:22:15Z","author_association":"OWNER","body":"@sairathb The only way to skip `npm prune` is if you switch to service packaging temporarily until the npm issue is fixed. (set `package: individually: false`). This disables the per function optimization, but as long as you do not have huge dependencies that are only used in a single of your functions, this should be ok as workaround.\r\nHowever, anyone visiting this issue should put a comment at the original npm issue [here](https://github.com/npm/npm/issues/19356) to put some pressure on it. They do not really seem to notice how critical the issue is."}}
{"actor":{"display_login":"HyperBrain"}}