{"action":"opened","issue":{"url":"https://api.github.com/repos/UnitedIncome/serverless-python-requirements/issues/16","repository_url":"https://api.github.com/repos/UnitedIncome/serverless-python-requirements","labels_url":"https://api.github.com/repos/UnitedIncome/serverless-python-requirements/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/UnitedIncome/serverless-python-requirements/issues/16/comments","events_url":"https://api.github.com/repos/UnitedIncome/serverless-python-requirements/issues/16/events","html_url":"https://github.com/UnitedIncome/serverless-python-requirements/issues/16","id":219554574,"number":16,"title":"Using `exclude` with no `include` fails","user":{"login":"miketheman","id":529516,"avatar_url":"https://avatars3.githubusercontent.com/u/529516?v=3","gravatar_id":"","url":"https://api.github.com/users/miketheman","html_url":"https://github.com/miketheman","followers_url":"https://api.github.com/users/miketheman/followers","following_url":"https://api.github.com/users/miketheman/following{/other_user}","gists_url":"https://api.github.com/users/miketheman/gists{/gist_id}","starred_url":"https://api.github.com/users/miketheman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miketheman/subscriptions","organizations_url":"https://api.github.com/users/miketheman/orgs","repos_url":"https://api.github.com/users/miketheman/repos","events_url":"https://api.github.com/users/miketheman/events{/privacy}","received_events_url":"https://api.github.com/users/miketheman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-05T11:40:50Z","updated_at":"2017-04-05T11:40:50Z","closed_at":null,"body":"With serverless-python-requirements@2.0.0.\r\n\r\nIf no `include:` directive is found, deploy triggers a failure.\r\n\r\nhttps://github.com/UnitedIncome/serverless-python-requirements/blob/7044eeb46c5c0f6c8e74c46d68f36dba5dc6dfff/index.js#L83-L84\r\n\r\n# Example serverless.yml\r\n\r\n```yaml\r\npackage:\r\n  exclude:\r\n    - .git/**\r\n```\r\n\r\n# Output\r\nRunning `SLS_DEBUG=* serverless deploy`:\r\n\r\n```\r\nServerless: Installing required Python packages...\r\nServerless: Linking required Python packages...\r\n\r\n  Type Error ---------------------------------------------\r\n\r\n     Cannot read property 'push' of undefined\r\n\r\n     For debugging logs, run again after setting the \"SLS_DEBUG=*\" environment variable.\r\n\r\n  Stack Trace --------------------------------------------\r\n\r\nTypeError: Cannot read property 'push' of undefined\r\n    at fse.readdirSync.map.file (/Users/miketheman/project/node_modules/serverless-python-requirements/index.js:83:50)\r\n    at Array.map (native)\r\n    at ServerlessPythonRequirements.linkRequirements (/Users/miketheman/project/node_modules/serverless-python-requirements/index.js:82:40)\r\n    at runCallback (timers.js:666:20)\r\n    at tryOnImmediate (timers.js:639:5)\r\n    at processImmediate [as _immediateCallback] (timers.js:611:5)\r\nFrom previous event:\r\n    at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:156:22)\r\n    at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:95:31)\r\n    at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless:23:50)\r\n    at process._tickCallback (internal/process/next_tick.js:109:7)\r\n\r\n  Get Support --------------------------------------------\r\n     Docs:          docs.serverless.com\r\n     Bugs:          github.com/serverless/serverless/issues\r\n\r\n     Please report this error. We think it might be a bug.\r\n\r\n  Your Environment Information -----------------------------\r\n     OS:                 darwin\r\n     Node Version:       7.7.4\r\n     Serverless Version: 1.9.0\r\n```\r\n\r\n# Workaround\r\n\r\nAdd an `include:` with any file you expect to always be part of your deployment package:\r\n\r\n```yaml\r\npackage:\r\n  include:\r\n    - requirements.txt\r\n  exclude:\r\n    - .git/**\r\n```"}}
{"actor":{"display_login":"miketheman"}}