{"action":"created","issue":{"url":"https://api.github.com/repos/crabbly/Print.js/issues/221","repository_url":"https://api.github.com/repos/crabbly/Print.js","labels_url":"https://api.github.com/repos/crabbly/Print.js/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/crabbly/Print.js/issues/221/comments","events_url":"https://api.github.com/repos/crabbly/Print.js/issues/221/events","html_url":"https://github.com/crabbly/Print.js/issues/221","id":357098972,"node_id":"MDU6SXNzdWUzNTcwOTg5NzI=","number":221,"title":"connecting to vuejs error","user":{"login":"bifjhh","id":29394439,"node_id":"MDQ6VXNlcjI5Mzk0NDM5","avatar_url":"https://avatars0.githubusercontent.com/u/29394439?v=4","gravatar_id":"","url":"https://api.github.com/users/bifjhh","html_url":"https://github.com/bifjhh","followers_url":"https://api.github.com/users/bifjhh/followers","following_url":"https://api.github.com/users/bifjhh/following{/other_user}","gists_url":"https://api.github.com/users/bifjhh/gists{/gist_id}","starred_url":"https://api.github.com/users/bifjhh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifjhh/subscriptions","organizations_url":"https://api.github.com/users/bifjhh/orgs","repos_url":"https://api.github.com/users/bifjhh/repos","events_url":"https://api.github.com/users/bifjhh/events{/privacy}","received_events_url":"https://api.github.com/users/bifjhh/received_events","type":"User","site_admin":false},"labels":[{"id":358325570,"node_id":"MDU6TGFiZWwzNTgzMjU1NzA=","url":"https://api.github.com/repos/crabbly/Print.js/labels/duplicate","name":"duplicate","color":"cccccc","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-05T07:27:41Z","updated_at":"2018-09-05T13:29:01Z","closed_at":"2018-09-05T13:29:01Z","author_association":"NONE","body":"import printJS from 'print-js'\r\nstartPrint() {\r\n        printJS({ printable: 'printForm', type: 'html' })\r\n      }\r\n![image](https://user-images.githubusercontent.com/29394439/45077609-2ef9e900-b120-11e8-8e45-9fe19ba8ae00.png)\r\n"},"comment":{"url":"https://api.github.com/repos/crabbly/Print.js/issues/comments/418730516","html_url":"https://github.com/crabbly/Print.js/issues/221#issuecomment-418730516","issue_url":"https://api.github.com/repos/crabbly/Print.js/issues/221","id":418730516,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODczMDUxNg==","user":{"login":"crabbly","id":16927940,"node_id":"MDQ6VXNlcjE2OTI3OTQw","avatar_url":"https://avatars0.githubusercontent.com/u/16927940?v=4","gravatar_id":"","url":"https://api.github.com/users/crabbly","html_url":"https://github.com/crabbly","followers_url":"https://api.github.com/users/crabbly/followers","following_url":"https://api.github.com/users/crabbly/following{/other_user}","gists_url":"https://api.github.com/users/crabbly/gists{/gist_id}","starred_url":"https://api.github.com/users/crabbly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crabbly/subscriptions","organizations_url":"https://api.github.com/users/crabbly/orgs","repos_url":"https://api.github.com/users/crabbly/repos","events_url":"https://api.github.com/users/crabbly/events{/privacy}","received_events_url":"https://api.github.com/users/crabbly/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T13:29:01Z","updated_at":"2018-09-05T13:29:01Z","author_association":"OWNER","body":"Hi @bifjhh ,\r\n\r\nWhen you import the lib inside the same file you are writing your code (same scope, in your case, inside your Vue component), using `import printJS from 'print-js'` is a problem, since the variable `printJS` will be overwritten.\r\n\r\nUse `import print from 'print-js'` instead. Or just `import 'print-js'`.\r\n\r\nThe library automatically exposes a global variable `printJS`.\r\n\r\nRef #217 "}}
{"actor":{"display_login":"crabbly"}}