Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"TypeError: Cannot read property 'on' of undefined" error when deploying with hexo-deployer-ftpsync #16

Closed
tufu9441 opened this issue Jun 30, 2016 · 2 comments

Comments

@tufu9441
Copy link
Member

After hexo d command, the following content shows:

INFO  Deploying: ftpsync
Setup
-------------------------------------------------------------
Settings:
{ local: '/Users/whm/Documents/hexo/public/',
  host: 'v0.ftp.upyun.com',
  port: 21,
  remote: '/',
  user: 'my_username',
  pass: '**********',
  connections: 1,
  ignore: [] }

Setup complete.

Collecting
-------------------------------------------------------------
/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/lib/jsftp.js:374
      socket.on("data", function(data) {
            ^

TypeError: Cannot read property 'on' of undefined
    at /Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/lib/jsftp.js:374:13
    at /Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/lib/jsftp.js:54:24
    at Array.<anonymous> (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/lib/jsftp.js:552:21)
    at Ftp.parse (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/lib/jsftp.js:237:13)
    at Ftp.parseResponse (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/lib/jsftp.js:148:8)
    at Stream.<anonymous> (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/lib/jsftp.js:119:24)
    at emitOne (events.js:77:13)
    at Stream.emit (events.js:169:7)
    at Stream.reemit (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/node_modules/event-stream/node_modules/duplexer/index.js:70:25)
    at emitOne (events.js:77:13)
    at Stream.emit (events.js:169:7)
    at Stream.write (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/node_modules/event-stream/index.js:192:12)
    at Stream.stream.write (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/node_modules/event-stream/node_modules/through/index.js:26:11)
    at Stream.ondata (stream.js:31:26)
    at emitOne (events.js:77:13)
    at Stream.emit (events.js:169:7)
    at drain (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/node_modules/event-stream/node_modules/through/index.js:36:16)
    at Stream.stream.queue.stream.push (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/node_modules/event-stream/node_modules/through/index.js:45:5)
    at emit (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/node_modules/event-stream/node_modules/split/index.js:35:14)
    at next (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/node_modules/event-stream/node_modules/split/index.js:44:7)
    at Stream.<anonymous> (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/node_modules/event-stream/node_modules/split/index.js:49:5)
    at Stream.stream.write (/Users/whm/Documents/hexo/node_modules/hexo-deployer-ftpsync/node_modules/ftpsync/node_modules/jsftp/node_modules/event-stream/node_modules/through/index.js:26:11)
    at Socket.ondata (_stream_readable.js:536:20)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at TCP.onread (net.js:531:20)
@zzming
Copy link

zzming commented Jun 1, 2017

I also met for this problem

@stevenjoezhang
Copy link
Member

Sorry for the late reply. I have already refactored this plugin. If the issue persists, please feel free to report it again. The installation method for the new version is: npm i hexo-deployer-ftpsync@0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants