TypeError: Cannot call method 'end' of undefined
at reentry (/Users/elverys7d/Documents/news-dev/infoplum-connector/node_modules/ftp/lib/connection.js:184:29)
at Parser.<anonymous> (/Users/elverys7d/Documents/news-dev/infoplum-connector/node_modules/ftp/lib/connection.js:108:22)
at EventEmitter.emit (events.js:98:17)
at Parser._write (/Users/elverys7d/Documents/news-dev/infoplum-connector/node_modules/ftp/lib/parser.js:57:10)
at doWrite (/Users/elverys7d/Documents/news-dev/infoplum-connector/node_modules/ftp/node_modules/readable-stream/lib/_stream_writable.js:211:10)
at writeOrBuffer (/Users/elverys7d/Documents/news-dev/infoplum-connector/node_modules/ftp/node_modules/readable-stream/lib/_stream_writable.js:201:5)
at Writable.write (/Users/elverys7d/Documents/news-dev/infoplum-connector/node_modules/ftp/node_modules/readable-stream/lib/_stream_writable.js:172:11)
at ondata (/Users/elverys7d/Documents/news-dev/infoplum-connector/node_modules/ftp/lib/connection.js:260:20)
The relevant block of connect.js is with the error thrown on the return self._socket.end();:
I'm getting the following error:
The relevant block of
connect.js
is with the error thrown on thereturn self._socket.end();
:As far as I can tell, there's no way to catch this error (aside from catching uncaught exceptions at the process level, which isn't ideal).