{"action":"created","issue":{"url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/42","repository_url":"https://api.github.com/repos/voltrue2/in-app-purchase","labels_url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/42/comments","events_url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/42/events","html_url":"https://github.com/voltrue2/in-app-purchase/issues/42","id":144957402,"number":42,"title":"[ERROR] TypeError: request.defaults is not a function","user":{"login":"roblav96","id":1457327,"avatar_url":"https://avatars.githubusercontent.com/u/1457327?v=3","gravatar_id":"","url":"https://api.github.com/users/roblav96","html_url":"https://github.com/roblav96","followers_url":"https://api.github.com/users/roblav96/followers","following_url":"https://api.github.com/users/roblav96/following{/other_user}","gists_url":"https://api.github.com/users/roblav96/gists{/gist_id}","starred_url":"https://api.github.com/users/roblav96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roblav96/subscriptions","organizations_url":"https://api.github.com/users/roblav96/orgs","repos_url":"https://api.github.com/users/roblav96/repos","events_url":"https://api.github.com/users/roblav96/events{/privacy}","received_events_url":"https://api.github.com/users/roblav96/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-31T16:58:34Z","updated_at":"2016-03-31T22:30:32Z","closed_at":null,"body":"Just updated to the latest version, and I'm getting this error when I start my server:\r\n\r\n```\r\nR-0 =============================== ERROR ================================\r\nR-0 > ERR > 12:55:57:164[/usr/local/lib/node_modules/pm2/node_modules/pmx/lib/notify.js:47]\r\nR-0         TypeError: request.defaults is not a function\r\nR-0     at Object.module.exports.readConfig (/Users/server/Projects/app/server/node_modules/in-app-purchase/lib/apple.js:41:21)\r\nR-0     at Object.module.exports.config (/Users/server/Projects/app/server/node_modules/in-app-purchase/index.js:15:8)\r\nR-0     at Object.<anonymous> (/Users/server/Projects/app/server/server/controllers/iap-ctrl.js:15:5)\r\nR-0     at Module._compile (module.js:413:34)\r\nR-0     at Object.Module._extensions..js (module.js:422:10)\r\nR-0     at Module.load (module.js:357:32)\r\nR-0     at Function.Module._load (module.js:314:12)\r\nR-0     at Function._load (/usr/local/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21)\r\nR-0     at Module.require (module.js:367:17)\r\nR-0     at require (internal/module.js:16:19)\r\nR-0     at Object.<anonymous> (/Users/server/Projects/app/server/server/routes/iap/verify.js:13:15)\r\nR-0     at Module._compile (module.js:413:34)\r\nR-0     at Object.Module._extensions..js (module.js:422:10)\r\nR-0     at Module.load (module.js:357:32)\r\nR-0     at Function.Module._load (module.js:314:12)\r\nR-0     at Function._load (/usr/local/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21)\r\nR-0     at Module.require (module.js:367:17)\r\nR-0     at require (internal/module.js:16:19)\r\nR-0     at Object.<anonymous> (/Users/server/Projects/app/server/server/server.js:287:33)\r\nR-0     at Module._compile (module.js:413:34)\r\nR-0     at Object.Module._extensions..js (module.js:422:10)\r\nR-0     at Module.load (module.js:357:32)\r\nPM2 App [R] with id [0] and pid [700], exited with code [255] via signal [null]\r\n```\r\n\r\nMy controller at\r\n```\r\niap-ctrl.js:15:5\r\n```\r\n```javascript\r\niap.config( {\r\n\trequestDefaults: {\r\n\t\ttimeout: 10000\r\n\t},\r\n\tapplePassword: \"1337\", // this comes from iTunes Connect\r\n\tgooglePublicKeyStrSandbox: \"1337\", // this is the path to the directory containing iap-sanbox/iap-live files\r\n\tgooglePublicKeyStrLive: \"1337\" // this is the path to the directory containing iap-sanbox/iap-live files\r\n} )\r\niap.setup()\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/comments/204157045","html_url":"https://github.com/voltrue2/in-app-purchase/issues/42#issuecomment-204157045","issue_url":"https://api.github.com/repos/voltrue2/in-app-purchase/issues/42","id":204157045,"user":{"login":"roblav96","id":1457327,"avatar_url":"https://avatars.githubusercontent.com/u/1457327?v=3","gravatar_id":"","url":"https://api.github.com/users/roblav96","html_url":"https://github.com/roblav96","followers_url":"https://api.github.com/users/roblav96/followers","following_url":"https://api.github.com/users/roblav96/following{/other_user}","gists_url":"https://api.github.com/users/roblav96/gists{/gist_id}","starred_url":"https://api.github.com/users/roblav96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roblav96/subscriptions","organizations_url":"https://api.github.com/users/roblav96/orgs","repos_url":"https://api.github.com/users/roblav96/repos","events_url":"https://api.github.com/users/roblav96/events{/privacy}","received_events_url":"https://api.github.com/users/roblav96/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T22:30:32Z","updated_at":"2016-03-31T22:30:32Z","body":"awesome! thanks man!"}}