Skip to content

Conversation

@etcart
Copy link
Contributor

@etcart etcart commented May 23, 2025

When you run the example usage code from sftp-client as is, it throws the following error because we're sending a command before connecting to the sftp server:

/home/aku/code/random/sftp-client/node_modules/.pnpm/@cumulus+sftp-client@20.0.0_aws-crt@1.25.3/node_modules/@cumulus/sftp-client/dist/index.js:78
            throw new Error('Client not connected');
                  ^

Error: Client not connected
    at get sftp (/home/aku/code/random/sftp-client/node_modules/.pnpm/@cumulus+sftp-client@20.0.0_aws-crt@1.25.3/node_modules/@cumulus/sftp-client/dist/index.js:78:19)
    at SftpClient.list (/home/aku/code/random/sftp-client/node_modules/.pnpm/@cumulus+sftp-client@20.0.0_aws-crt@1.25.3/node_modules/@cumulus/sftp-client/dist/index.js:180:40)
    at file:///home/aku/code/random/sftp-client/index.ts:18:32
    at file:///home/aku/code/random/sftp-client/index.ts:52:3
    at ModuleJob.run (node:internal/modules/esm/module_job:268:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:543:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)

Summary: Summary of changes

Addresses CUMULUS-XX: Develop amazing new feature

Changes

  • Detailed list or prose of changes
  • ...

PR Checklist

  • Update CHANGELOG
  • Unit tests
  • Ad-hoc testing - Deploy changes and test manually
  • Integration tests

When you run the example usage code from `sftp-client` as is, it throws the following error because we're sending a command before connecting to the sftp server:

```
/home/aku/code/random/sftp-client/node_modules/.pnpm/@Cumulus+sftp-client@20.0.0_aws-crt@1.25.3/node_modules/@cumulus/sftp-client/dist/index.js:78
            throw new Error('Client not connected');
                  ^

Error: Client not connected
    at get sftp (/home/aku/code/random/sftp-client/node_modules/.pnpm/@Cumulus+sftp-client@20.0.0_aws-crt@1.25.3/node_modules/@cumulus/sftp-client/dist/index.js:78:19)
    at SftpClient.list (/home/aku/code/random/sftp-client/node_modules/.pnpm/@Cumulus+sftp-client@20.0.0_aws-crt@1.25.3/node_modules/@cumulus/sftp-client/dist/index.js:180:40)
    at file:///home/aku/code/random/sftp-client/index.ts:18:32
    at file:///home/aku/code/random/sftp-client/index.ts:52:3
    at ModuleJob.run (node:internal/modules/esm/module_job:268:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:543:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
```
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

Successfully merging this pull request may close these issues.

3 participants