{"action":"created","issue":{"url":"https://api.github.com/repos/bjyoungblood/hapi-serve-s3/issues/7","repository_url":"https://api.github.com/repos/bjyoungblood/hapi-serve-s3","labels_url":"https://api.github.com/repos/bjyoungblood/hapi-serve-s3/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/bjyoungblood/hapi-serve-s3/issues/7/comments","events_url":"https://api.github.com/repos/bjyoungblood/hapi-serve-s3/issues/7/events","html_url":"https://github.com/bjyoungblood/hapi-serve-s3/issues/7","id":171177024,"number":7,"title":"Error: Invalid plugin options","user":{"login":"sergions80","id":2645520,"avatar_url":"https://avatars1.githubusercontent.com/u/2645520?v=4","gravatar_id":"","url":"https://api.github.com/users/sergions80","html_url":"https://github.com/sergions80","followers_url":"https://api.github.com/users/sergions80/followers","following_url":"https://api.github.com/users/sergions80/following{/other_user}","gists_url":"https://api.github.com/users/sergions80/gists{/gist_id}","starred_url":"https://api.github.com/users/sergions80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergions80/subscriptions","organizations_url":"https://api.github.com/users/sergions80/orgs","repos_url":"https://api.github.com/users/sergions80/repos","events_url":"https://api.github.com/users/sergions80/events{/privacy}","received_events_url":"https://api.github.com/users/sergions80/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-15T14:06:06Z","updated_at":"2017-11-16T16:04:14Z","closed_at":"2017-05-16T12:50:56Z","author_association":"NONE","body":"I tried to use with Glue but the following error occurs :\n\n``` javascript\nError: Invalid plugin options {\n  \"register\" [1]: {\n    \"__esModule\": true,\n    \"default\": function register(server, options, next) {\\n  function s3Handler(route, routeOptions) {\\n    if (route.method !== 'get') {\\n      throw new Error('s3 handler currently only supports GET');\\n    }\\n\\n    var valid = _joi2.default.validate(routeOptions, routeOptionsSchema);\\n    if (valid.error) {\\n      throw valid.error;\\n    }\\n\\n    route.settings.plugins.s3 = valid.value; // eslint-disable-line no-param-reassign\\n\\n    return handler;\\n  }\\n\\n  s3Handler.defaults = {\\n    payload: {\\n      output: 'stream',\\n      parse: false\\n    }\\n  };\\n\\n  server.handler('s3', s3Handler);\\n\\n  next();\\n}\n  }\n}\n\n[1] \"register\" must be a Function\n```\n\nThe error occurs because the register function is being exported as an object with default attribute. \nOne solution would be to use module.exports to export the function instead of the default export of the ES6.\n"},"comment":{"url":"https://api.github.com/repos/bjyoungblood/hapi-serve-s3/issues/comments/344969935","html_url":"https://github.com/bjyoungblood/hapi-serve-s3/issues/7#issuecomment-344969935","issue_url":"https://api.github.com/repos/bjyoungblood/hapi-serve-s3/issues/7","id":344969935,"user":{"login":"leotm","id":1881059,"avatar_url":"https://avatars3.githubusercontent.com/u/1881059?v=4","gravatar_id":"","url":"https://api.github.com/users/leotm","html_url":"https://github.com/leotm","followers_url":"https://api.github.com/users/leotm/followers","following_url":"https://api.github.com/users/leotm/following{/other_user}","gists_url":"https://api.github.com/users/leotm/gists{/gist_id}","starred_url":"https://api.github.com/users/leotm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leotm/subscriptions","organizations_url":"https://api.github.com/users/leotm/orgs","repos_url":"https://api.github.com/users/leotm/repos","events_url":"https://api.github.com/users/leotm/events{/privacy}","received_events_url":"https://api.github.com/users/leotm/received_events","type":"User","site_admin":false},"created_at":"2017-11-16T16:04:14Z","updated_at":"2017-11-16T16:04:14Z","author_association":"NONE","body":"In my case with\r\n```\r\n    \"inert\": \"^5.0.1\",\r\n    \"vision\": \"^5.1.0\",\r\n```\r\nGive the error.\r\n`const { default: hapi } = require('hapi')` still give the error.\r\nReverting to\r\n```\r\n    \"inert\": \"^4.2.1\",\r\n    \"vision\": \"^4.1.1\",\r\n```\r\nWorked.\r\nThis may be the same issue with other plugins."}}
{"actor":{"display_login":"leotm"}}