jsftp is a client library for the File Transfer Protocol (FTP) specifically designed for Node.js environments. It emphasizes correctness, clarity, and conciseness, providing both low-level access to raw FTP commands and higher-level convenience methods for common operations like file transfers and directory listings. The current stable version is 2.1.3, released on an as-needed basis for bug fixes and feature enhancements, with previous major versions dropping older Node.js compatibility and updating APIs. A key differentiator is its integration with Node.js streaming APIs, allowing for efficient handling of file data. It exposes the underlying FTP protocol responses with `code` and `text` properties, giving developers granular control and insight into server interactions.
npm install jsftpVerified import paths — ran on the pinned version, not inferred.
This code demonstrates how to establish a connection to an FTP server, retrieve its system information using a raw command, and then gracefully disconnect. It uses environment variables for host, port, user, and password for secure configuration.
Review the documentation for `jsftp` v2.0.0 to understand the new `raw` API and adapt your code accordingly. Responses now consistently return an object with `code` and `text` properties.
Ensure your Node.js environment is at least version 6.x or newer, as specified in the package's engine requirements (`engines.node: ">=6"`).
Upgrade `jsftp` to version 1.3.7 or newer. This version introduces proper error generation for simultaneous PASV requests, allowing your application to handle the error gracefully instead of crashing. It is still recommended to sequentialize passive operations where possible.
Update `jsftp` to version 1.3.4 or higher to ensure that `LIST` commands for invalid paths correctly propagate errors to the callback.
Upgrade `jsftp` to version 1.3.1 or newer. This version fixed the `get` method to correctly abort file retrieval when passive socket errors occur.
Upgrade to `jsftp` v1.3.7 or higher, which will instead generate an error for this scenario. Prefer sequentializing passive operations or ensure robust error handling for concurrent requests.
Update `jsftp` to version 1.3.4 or newer to ensure that errors for non-existent paths are correctly passed to the callback.
Upgrade `jsftp` to version 1.3.1 or a later version to fix this behavior, ensuring `get` respects passive socket errors.
No dependency data recorded yet.