{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/6604","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/6604/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/6604/comments","events_url":"https://api.github.com/repos/electron/electron/issues/6604/events","html_url":"https://github.com/electron/electron/issues/6604","id":167508177,"number":6604,"title":"Electron is not playing nice with the jsftp module","user":{"login":"IrosTheBeggar","id":1396994,"avatar_url":"https://avatars.githubusercontent.com/u/1396994?v=3","gravatar_id":"","url":"https://api.github.com/users/IrosTheBeggar","html_url":"https://github.com/IrosTheBeggar","followers_url":"https://api.github.com/users/IrosTheBeggar/followers","following_url":"https://api.github.com/users/IrosTheBeggar/following{/other_user}","gists_url":"https://api.github.com/users/IrosTheBeggar/gists{/gist_id}","starred_url":"https://api.github.com/users/IrosTheBeggar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IrosTheBeggar/subscriptions","organizations_url":"https://api.github.com/users/IrosTheBeggar/orgs","repos_url":"https://api.github.com/users/IrosTheBeggar/repos","events_url":"https://api.github.com/users/IrosTheBeggar/events{/privacy}","received_events_url":"https://api.github.com/users/IrosTheBeggar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-26T02:31:43Z","updated_at":"2016-07-26T03:49:56Z","closed_at":null,"body":"* Electron version: 1.2.6\r\n* Operating system: OSX\r\n\r\nI'm loading up the [jsftp module](https://github.com/sergi/jsftp) in the renderer like so:\r\n```\r\nconst JSFtp = remote.require(\"jsftp\");\r\nvar ftp = new JSFtp({\r\n  // credentials\r\n});\r\n```\r\n\r\nThe following functions works\r\n```\r\n  ftp.auth(\"user\", \"pass\", function(hadErr) {\r\n    if (hadErr){\r\n      console.log(\"Something went wrong\");\r\n      return;\r\n    }\r\n    console.log('it worked');\r\n  });\r\n```\r\n\r\nHowever this function fails with an error of 'ftp.raw.mkd is not a function':\r\n```\r\n  ftp.raw.mkd(\"new_dir\", function(err, data) {\r\n      if (err) return console.error(err);\r\n  });\r\n```\r\n\r\nThe ftp.raw.mkd works just fine when I run the code using just nodejs.  But when I try running it in electron it errors.   Is there something I'm doing wrong?\r\n\r\nOn top of that the [jsftp-mkdirp module](https://github.com/sindresorhus/jsftp-mkdirp) doesn't work in electron but works just fine with node."},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/235155464","html_url":"https://github.com/electron/electron/issues/6604#issuecomment-235155464","issue_url":"https://api.github.com/repos/electron/electron/issues/6604","id":235155464,"user":{"login":"IrosTheBeggar","id":1396994,"avatar_url":"https://avatars.githubusercontent.com/u/1396994?v=3","gravatar_id":"","url":"https://api.github.com/users/IrosTheBeggar","html_url":"https://github.com/IrosTheBeggar","followers_url":"https://api.github.com/users/IrosTheBeggar/followers","following_url":"https://api.github.com/users/IrosTheBeggar/following{/other_user}","gists_url":"https://api.github.com/users/IrosTheBeggar/gists{/gist_id}","starred_url":"https://api.github.com/users/IrosTheBeggar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IrosTheBeggar/subscriptions","organizations_url":"https://api.github.com/users/IrosTheBeggar/orgs","repos_url":"https://api.github.com/users/IrosTheBeggar/repos","events_url":"https://api.github.com/users/IrosTheBeggar/events{/privacy}","received_events_url":"https://api.github.com/users/IrosTheBeggar/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T03:49:56Z","updated_at":"2016-07-26T03:49:56Z","body":"I'm using remote.require because  this is being used in the renderer.  I'm setting it up like this\r\n\r\n```\r\n'use strict';\r\n\r\nconst remote = require('electron').remote;\r\nconst app = remote.app;\r\nconst dialog = remote.require('electron').dialog;\r\n\r\nconst JSFtp = remote.require(\"jsftp\");\r\n\r\n...\r\n```"}}
{"actor":{"display_login":"IrosTheBeggar"}}