{"action":"created","issue":{"url":"https://api.github.com/repos/orionjs/orion/issues/294","labels_url":"https://api.github.com/repos/orionjs/orion/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/orionjs/orion/issues/294/comments","events_url":"https://api.github.com/repos/orionjs/orion/issues/294/events","html_url":"https://github.com/orionjs/orion/issues/294","id":105188624,"number":294,"title":"Problems with server side routes & Orion (v1.4.0)","user":{"login":"jorisroling","id":635729,"avatar_url":"https://avatars.githubusercontent.com/u/635729?v=3","gravatar_id":"","url":"https://api.github.com/users/jorisroling","html_url":"https://github.com/jorisroling","followers_url":"https://api.github.com/users/jorisroling/followers","following_url":"https://api.github.com/users/jorisroling/following{/other_user}","gists_url":"https://api.github.com/users/jorisroling/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisroling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisroling/subscriptions","organizations_url":"https://api.github.com/users/jorisroling/orgs","repos_url":"https://api.github.com/users/jorisroling/repos","events_url":"https://api.github.com/users/jorisroling/events{/privacy}","received_events_url":"https://api.github.com/users/jorisroling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-07T10:14:02Z","updated_at":"2015-09-16T02:06:22Z","closed_at":null,"body":"Hi All,\r\n\r\nI've got a problem with Orion (v1.4.0) and server side routes (Iron Router). The error I (whenever I try the GET route in a browser) get is this: **TypeError: Object function router(req, res, next) ... has no method 'current'** (full error below).\r\n\r\nTo recreate the setup:\r\n* Create a project with: **meteor create tst**\r\n* cd into tsts with: **cd tst**\r\n* remove the standard files with: **rm tst.css tst.html tst.js**\r\n* create server folder with: **mkdir server**\r\n* create **router.js** file with the following contents:\r\n```js\r\nRouter.route('/hello', function () {\r\n  var req = this.request;\r\n  var res = this.response;\r\n  res.end('OK');\r\n}, {where: 'server'});\r\n```\r\n\r\nNow add Orion Packages as [follows](http://orionjs.org/docs/introduction) (as the official site explains)\r\n\r\n* meteor add orionjs:core\r\n* meteor add twbs:bootstrap fortawesome:fontawesome orionjs:bootstrap\r\n* meteor add iron:router\r\n\r\nNow run **meteor**\r\n\r\nNow this should result on a (very) simple project, that would respond to the URL **http://localhost:3000/hello** with the text *OK*. Instead it breaks with the server error below.\r\n\r\nIf I would do this without the Orion packages (just Iron Router), everything works as expected.\r\n\r\nAnyone any idea how to get arround this?\r\n\r\nRegards,\r\nJoris\r\n\r\n\r\n###Full error\r\n```\r\nW20150907-11:32:15.185(2)? (STDERR) TypeError: Object function router(req, res, next) {                                                          // 13\r\nW20150907-11:32:15.185(2)? (STDERR)     //XXX this assumes no other routers on the parent stack which we should probably fix      // 14\r\nW20150907-11:32:15.186(2)? (STDERR)     router.dispatch(req.url, {                                                                // 15\r\nW20150907-11:32:15.186(2)? (STDERR)       request: req,                                                                           // 16\r\nW20150907-11:32:15.186(2)? (STDERR)       response: res                                                                           // 17\r\nW20150907-11:32:15.186(2)? (STDERR)     }, next);                                                                                 // 18\r\nW20150907-11:32:15.186(2)? (STDERR)   } has no method 'current'\r\nW20150907-11:32:15.186(2)? (STDERR)     at [object Object].<anonymous> (packages/orionjs:accounts/authentication/secure-routes.js:10:1)\r\nW20150907-11:32:15.186(2)? (STDERR)     at packages/iron:router/lib/router.js:277:1\r\nW20150907-11:32:15.186(2)? (STDERR)     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)\r\nW20150907-11:32:15.186(2)? (STDERR)     at [object Object].hookWithOptions (packages/iron:router/lib/router.js:276:1)\r\nW20150907-11:32:15.186(2)? (STDERR)     at boundNext (packages/iron:middleware-stack/lib/middleware_stack.js:251:1)\r\nW20150907-11:32:15.186(2)? (STDERR)     at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108:1)\r\nW20150907-11:32:15.186(2)? (STDERR)     at packages/meteor/dynamics_nodejs.js:121:1\r\nW20150907-11:32:15.186(2)? (STDERR)     at [object Object].dispatch (packages/iron:middleware-stack/lib/middleware_stack.js:275:1)\r\nW20150907-11:32:15.186(2)? (STDERR)     at [object Object].RouteController._runRoute (packages/iron:router/lib/route_controller_server.js:63:1)\r\nW20150907-11:32:15.187(2)? (STDERR)     at Function.Route.dispatch (packages/iron:router/lib/route.js:156:1)\r\nW20150907-11:32:15.187(2)? (STDERR)     at [object Object].route (packages/iron:router/lib/route.js:13:1)\r\nW20150907-11:32:15.187(2)? (STDERR)     at boundNext (packages/iron:middleware-stack/lib/middleware_stack.js:251:1)\r\nW20150907-11:32:15.187(2)? (STDERR)     at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108:1)\r\nW20150907-11:32:15.187(2)? (STDERR)     at packages/meteor/dynamics_nodejs.js:121:1\r\nW20150907-11:32:15.187(2)? (STDERR)     at boundNext (packages/iron:middleware-stack/lib/middleware_stack.js:198:1)\r\nW20150907-11:32:15.187(2)? (STDERR)     at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108:1)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/orionjs/orion/issues/comments/140601131","html_url":"https://github.com/orionjs/orion/issues/294#issuecomment-140601131","issue_url":"https://api.github.com/repos/orionjs/orion/issues/294","id":140601131,"user":{"login":"frabrunelle","id":1114844,"avatar_url":"https://avatars.githubusercontent.com/u/1114844?v=3","gravatar_id":"","url":"https://api.github.com/users/frabrunelle","html_url":"https://github.com/frabrunelle","followers_url":"https://api.github.com/users/frabrunelle/followers","following_url":"https://api.github.com/users/frabrunelle/following{/other_user}","gists_url":"https://api.github.com/users/frabrunelle/gists{/gist_id}","starred_url":"https://api.github.com/users/frabrunelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frabrunelle/subscriptions","organizations_url":"https://api.github.com/users/frabrunelle/orgs","repos_url":"https://api.github.com/users/frabrunelle/repos","events_url":"https://api.github.com/users/frabrunelle/events{/privacy}","received_events_url":"https://api.github.com/users/frabrunelle/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T02:06:22Z","updated_at":"2015-09-16T02:06:22Z","body":"For some reason I wasn't at the latest version of `orionjs:accounts` (1.4.2 instead of 1.4.7) and I had to manually update with `meteor update orionjs:accounts`.\r\n\r\nEverything works fine now. Cheers!"}}