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

fix sftp-client usage docs #3936

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix sftp-client usage docs #3936

wants to merge 1 commit into from

Conversation

binjamil
Copy link

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/@[email protected][email protected]/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/@[email protected][email protected]/node_modules/@cumulus/sftp-client/dist/index.js:78:19)
    at SftpClient.list (/home/aku/code/random/sftp-client/node_modules/.pnpm/@[email protected][email protected]/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[email protected][email protected]/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[email protected][email protected]/node_modules/@cumulus/sftp-client/dist/index.js:78:19)
    at SftpClient.list (/home/aku/code/random/sftp-client/node_modules/.pnpm/@Cumulus[email protected][email protected]/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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants