{"action":"created","issue":{"url":"https://api.github.com/repos/koajs/koa/issues/568","labels_url":"https://api.github.com/repos/koajs/koa/issues/568/labels{/name}","comments_url":"https://api.github.com/repos/koajs/koa/issues/568/comments","events_url":"https://api.github.com/repos/koajs/koa/issues/568/events","html_url":"https://github.com/koajs/koa/issues/568","id":113913933,"number":568,"title":"TypeError: Class constructors cannot be invoked without 'new'","user":{"login":"thelinuxlich","id":5043,"avatar_url":"https://avatars.githubusercontent.com/u/5043?v=3","gravatar_id":"","url":"https://api.github.com/users/thelinuxlich","html_url":"https://github.com/thelinuxlich","followers_url":"https://api.github.com/users/thelinuxlich/followers","following_url":"https://api.github.com/users/thelinuxlich/following{/other_user}","gists_url":"https://api.github.com/users/thelinuxlich/gists{/gist_id}","starred_url":"https://api.github.com/users/thelinuxlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelinuxlich/subscriptions","organizations_url":"https://api.github.com/users/thelinuxlich/orgs","repos_url":"https://api.github.com/users/thelinuxlich/repos","events_url":"https://api.github.com/users/thelinuxlich/events{/privacy}","received_events_url":"https://api.github.com/users/thelinuxlich/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-28T20:22:28Z","updated_at":"2015-10-28T20:52:57Z","closed_at":"2015-10-28T20:43:08Z","body":"Trying to test koa 2 alpha, getting this error:\r\n\r\n```\r\nconstructor() {\r\n10/28/15 06:20:06\r\naidax-collector-1 aidax[1491]: ^\r\n10/28/15 06:20:06\r\naidax-collector-1 aidax[1491]: TypeError: Class constructors cannot be invoked without 'new'\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at require (module.js:384:17)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at normalLoader (/app/releases/20151028201122/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:199:5)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at startup (node.js:117:18)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Function.Module.runMain (module.js:475:10)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Module._compile (module.js:434:26)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Object.Module._extensions..js (module.js:452:10)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Module.load (module.js:355:32)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Function.Module._load (module.js:310:12)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Object.<anonymous> (/app/releases/20151028201122/node_modules/koa-cluster/lib/http.js:9:11)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at require (module.js:384:17)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Module.require (module.js:365:17)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Function.Module._load (module.js:310:12)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Module.load (module.js:355:32)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Object.<anonymous> (/app/releases/20151028201122/index.js:6:1)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Module._compile (module.js:434:26)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Object.Module._extensions..js (module.js:452:10)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at node.js:951:3\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Module.require (module.js:365:17)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Module.load (module.js:355:32)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Function.Module._load (module.js:310:12)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Object.require.extensions.(anonymous function) [as .js] (/app/releases/20151028201122/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:216:7)\r\n10/28/15 06:20:05\r\naidax-collector-1 aidax[1491]: at Module._compile (module.js:434:26)\r\n```"},"comment":{"url":"https://api.github.com/repos/koajs/koa/issues/comments/151986867","html_url":"https://github.com/koajs/koa/issues/568#issuecomment-151986867","issue_url":"https://api.github.com/repos/koajs/koa/issues/568","id":151986867,"user":{"login":"tejasmanohar","id":5959235,"avatar_url":"https://avatars.githubusercontent.com/u/5959235?v=3","gravatar_id":"","url":"https://api.github.com/users/tejasmanohar","html_url":"https://github.com/tejasmanohar","followers_url":"https://api.github.com/users/tejasmanohar/followers","following_url":"https://api.github.com/users/tejasmanohar/following{/other_user}","gists_url":"https://api.github.com/users/tejasmanohar/gists{/gist_id}","starred_url":"https://api.github.com/users/tejasmanohar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejasmanohar/subscriptions","organizations_url":"https://api.github.com/users/tejasmanohar/orgs","repos_url":"https://api.github.com/users/tejasmanohar/repos","events_url":"https://api.github.com/users/tejasmanohar/events{/privacy}","received_events_url":"https://api.github.com/users/tejasmanohar/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T20:52:57Z","updated_at":"2015-10-28T20:52:57Z","body":"Yeah, we need a major changes doc b/w v1 and v2 :P\r\n\r\nThat said, even though I submitted the PR for making Application a class, I'm still meh about it. There's little to no practical use of 2 \"Koa\"s in 1 app so why shall it be a class vs a prototype or instance returned\r\n\r\nbut looks like this is the upcoming standard / where the community is going "}}