{"action":"created","issue":{"url":"https://api.github.com/repos/fanout/node-pubcontrol/issues/2","repository_url":"https://api.github.com/repos/fanout/node-pubcontrol","labels_url":"https://api.github.com/repos/fanout/node-pubcontrol/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/fanout/node-pubcontrol/issues/2/comments","events_url":"https://api.github.com/repos/fanout/node-pubcontrol/issues/2/events","html_url":"https://github.com/fanout/node-pubcontrol/issues/2","id":342425049,"node_id":"MDU6SXNzdWUzNDI0MjUwNDk=","number":2,"title":"TypeError: transport is not a function","user":{"login":"f3ist","id":5295555,"node_id":"MDQ6VXNlcjUyOTU1NTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5295555?v=4","gravatar_id":"","url":"https://api.github.com/users/f3ist","html_url":"https://github.com/f3ist","followers_url":"https://api.github.com/users/f3ist/followers","following_url":"https://api.github.com/users/f3ist/following{/other_user}","gists_url":"https://api.github.com/users/f3ist/gists{/gist_id}","starred_url":"https://api.github.com/users/f3ist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f3ist/subscriptions","organizations_url":"https://api.github.com/users/f3ist/orgs","repos_url":"https://api.github.com/users/f3ist/repos","events_url":"https://api.github.com/users/f3ist/events{/privacy}","received_events_url":"https://api.github.com/users/f3ist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-07-18T17:37:22Z","updated_at":"2018-07-23T18:04:53Z","closed_at":null,"author_association":"NONE","body":"I'm getting an error in v1.2.0 when trying to publish messages.\r\n\r\n```\r\nError publishing TypeError: transport is not a function\r\nat Object.performHttpRequest (/var/task/webpack:/builds/.../node_modules/pubcontrol/lib/pubcontrolclient.js:103:1)\r\nat Object.startPubCall (/var/task/webpack:/builds/.../node_modules/pubcontrol/lib/pubcontrolclient.js:96:1)\r\nat Object.publish (/var/task/webpack:/builds/.../node_modules/pubcontrol/lib/pubcontrolclient.js:57:1)\r\nat /var/task/webpack:/builds/.../node_modules/pubcontrol/lib/pubcontrol.js:81:1\r\nat Array.forEach (<anonymous>)\r\nat utilities.defineClass.removeAllClients.clients.publish (/var/task/webpack:/builds/.../node_modules/pubcontrol/lib/pubcontrol.js:80:1)\r\nat utilities.defineClass.applyGripConfig.pubControl.publish (/var/task/webpack:/builds/.../node_modules/grip/lib/grippubcontrol.js:79:1)\r\n```"},"comment":{"url":"https://api.github.com/repos/fanout/node-pubcontrol/issues/comments/407148782","html_url":"https://github.com/fanout/node-pubcontrol/issues/2#issuecomment-407148782","issue_url":"https://api.github.com/repos/fanout/node-pubcontrol/issues/2","id":407148782,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzE0ODc4Mg==","user":{"login":"jkarneges","id":521953,"node_id":"MDQ6VXNlcjUyMTk1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/521953?v=4","gravatar_id":"","url":"https://api.github.com/users/jkarneges","html_url":"https://github.com/jkarneges","followers_url":"https://api.github.com/users/jkarneges/followers","following_url":"https://api.github.com/users/jkarneges/following{/other_user}","gists_url":"https://api.github.com/users/jkarneges/gists{/gist_id}","starred_url":"https://api.github.com/users/jkarneges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkarneges/subscriptions","organizations_url":"https://api.github.com/users/jkarneges/orgs","repos_url":"https://api.github.com/users/jkarneges/repos","events_url":"https://api.github.com/users/jkarneges/events{/privacy}","received_events_url":"https://api.github.com/users/jkarneges/received_events","type":"User","site_admin":false},"created_at":"2018-07-23T18:04:53Z","updated_at":"2018-07-23T18:04:53Z","author_association":"MEMBER","body":"It seems this is a known issue between node-fetch and webpack: https://github.com/bitinn/node-fetch/issues/450\r\n\r\nThe [last comment](https://github.com/bitinn/node-fetch/issues/450#issuecomment-387045223) on the above issue suggests a fix of simply appending `.default` to the require, and this should work in both webpack and non-webpack situations. Notably this approach is now being used by [Octokit](https://github.com/octokit/rest.js/pull/939/files).\r\n\r\nI've tested this fix with and without webpack and it works for me. @f3ist can you change `require('node-fetch')` to `require('node-fetch').default` in pubcontrolclient.js to confirm it works for you too?"}}
{"actor":{"display_login":"jkarneges"}}