{"action":"created","issue":{"url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/369","repository_url":"https://api.github.com/repos/jagi/meteor-astronomy","labels_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/369/comments","events_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/369/events","html_url":"https://github.com/jagi/meteor-astronomy/issues/369","id":153028644,"number":369,"title":"[v2] file level import not read in events","user":{"login":"s7dhansh","id":706996,"avatar_url":"https://avatars.githubusercontent.com/u/706996?v=3","gravatar_id":"","url":"https://api.github.com/users/s7dhansh","html_url":"https://github.com/s7dhansh","followers_url":"https://api.github.com/users/s7dhansh/followers","following_url":"https://api.github.com/users/s7dhansh/following{/other_user}","gists_url":"https://api.github.com/users/s7dhansh/gists{/gist_id}","starred_url":"https://api.github.com/users/s7dhansh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s7dhansh/subscriptions","organizations_url":"https://api.github.com/users/s7dhansh/orgs","repos_url":"https://api.github.com/users/s7dhansh/repos","events_url":"https://api.github.com/users/s7dhansh/events{/privacy}","received_events_url":"https://api.github.com/users/s7dhansh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-04T14:39:39Z","updated_at":"2016-05-15T08:31:36Z","closed_at":null,"body":"Let's say I add create a file: \r\n```\r\nimport {User} from \"path\";\r\n\r\nconst Profile = Class.create({\r\n...\r\nevents: {\r\n afterInit() {\r\n  User.findOne(...)    /// gives error, findOne of undefined. \r\n }\r\n}\r\n})\r\n\r\n```\r\n\r\nUsing a `const { User } = require(..)` in afterInit function, also gives the same error?\r\n\r\nWhat am I doing wrong? Or is this a bug?"},"comment":{"url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/comments/219273079","html_url":"https://github.com/jagi/meteor-astronomy/issues/369#issuecomment-219273079","issue_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/369","id":219273079,"user":{"login":"jagi","id":1051229,"avatar_url":"https://avatars.githubusercontent.com/u/1051229?v=3","gravatar_id":"","url":"https://api.github.com/users/jagi","html_url":"https://github.com/jagi","followers_url":"https://api.github.com/users/jagi/followers","following_url":"https://api.github.com/users/jagi/following{/other_user}","gists_url":"https://api.github.com/users/jagi/gists{/gist_id}","starred_url":"https://api.github.com/users/jagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagi/subscriptions","organizations_url":"https://api.github.com/users/jagi/orgs","repos_url":"https://api.github.com/users/jagi/repos","events_url":"https://api.github.com/users/jagi/events{/privacy}","received_events_url":"https://api.github.com/users/jagi/received_events","type":"User","site_admin":false},"created_at":"2016-05-15T08:31:36Z","updated_at":"2016-05-15T08:31:36Z","body":"Could you give an example of such a function wrapping?\r\n\r\nSorry for responding so late but I'm on my business trip and I'm not working a lot on Astronomy."}}