{"action":"created","issue":{"url":"https://api.github.com/repos/ternjs/tern_for_sublime/issues/111","labels_url":"https://api.github.com/repos/ternjs/tern_for_sublime/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/ternjs/tern_for_sublime/issues/111/comments","events_url":"https://api.github.com/repos/ternjs/tern_for_sublime/issues/111/events","html_url":"https://github.com/ternjs/tern_for_sublime/issues/111","id":129097882,"number":111,"title":"TernDef returns \"TypeError: cannot read property 'origin' of null\"","user":{"login":"jaapz","id":513050,"avatar_url":"https://avatars.githubusercontent.com/u/513050?v=3","gravatar_id":"","url":"https://api.github.com/users/jaapz","html_url":"https://github.com/jaapz","followers_url":"https://api.github.com/users/jaapz/followers","following_url":"https://api.github.com/users/jaapz/following{/other_user}","gists_url":"https://api.github.com/users/jaapz/gists{/gist_id}","starred_url":"https://api.github.com/users/jaapz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaapz/subscriptions","organizations_url":"https://api.github.com/users/jaapz/orgs","repos_url":"https://api.github.com/users/jaapz/repos","events_url":"https://api.github.com/users/jaapz/events{/privacy}","received_events_url":"https://api.github.com/users/jaapz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-27T10:24:30Z","updated_at":"2016-01-27T10:30:24Z","closed_at":"2016-01-27T10:30:24Z","body":"So I have the following configuration:\r\n\r\n```\r\n{\r\n    \"libs\": [\r\n        \"browser\",\r\n        \"ecma6\",\r\n        \"jquery\"\r\n    ],\r\n    \"plugins\": {\r\n        \"node\": {},\r\n        \"es_modules\": {}\r\n    }\r\n}\r\n```\r\n\r\nAnd I use `tern_for_vim` to supply autocompletion to javascript files in vim.\r\n\r\nNow, when I import a function like this:\r\n\r\n```\r\nimport sprintf from 'underscore.string/sprintf';\r\n```\r\nAnd then do `:TernDef` on the `sprintf`, I'm not taken to the definition of sprintf and instead I get the error message as described in the title of this message.\r\n\r\nHowever, when I import it like this:\r\n\r\n```\r\nimport * as us from 'underscore.string';\r\n```\r\n\r\nI have working autocompletion on the `us` object, and `:TernDef` correctly brings me to the `main.js` file of underscore.string.\r\n\r\nI get this message also on modules that don't live in `node_modules`, but not always :(\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ternjs/tern_for_sublime/issues/comments/175539022","html_url":"https://github.com/ternjs/tern_for_sublime/issues/111#issuecomment-175539022","issue_url":"https://api.github.com/repos/ternjs/tern_for_sublime/issues/111","id":175539022,"user":{"login":"jaapz","id":513050,"avatar_url":"https://avatars.githubusercontent.com/u/513050?v=3","gravatar_id":"","url":"https://api.github.com/users/jaapz","html_url":"https://github.com/jaapz","followers_url":"https://api.github.com/users/jaapz/followers","following_url":"https://api.github.com/users/jaapz/following{/other_user}","gists_url":"https://api.github.com/users/jaapz/gists{/gist_id}","starred_url":"https://api.github.com/users/jaapz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaapz/subscriptions","organizations_url":"https://api.github.com/users/jaapz/orgs","repos_url":"https://api.github.com/users/jaapz/repos","events_url":"https://api.github.com/users/jaapz/events{/privacy}","received_events_url":"https://api.github.com/users/jaapz/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T10:30:24Z","updated_at":"2016-01-27T10:30:24Z","body":"Sorry I just realized this is the wrong repository, I will move it to the correct repo."}}