there is an error on bun
babpulss opened this issue · comments
there is an error when running on bun not on nodejs
in bun list function returns empty list
my example code below:
`
import * as ftp from "basic-ftp"
example()
async function example() {
const client = new ftp.Client()
// client.ftp.verbose = true
try {
await client.access({
host: "test.rebex.net",
user: "demo",
password: "password",
// secure: true
})
console.log('hello')
const i = await client.list()
console.log('hello world')
console.log(i)
// console.log(r[1], r[1]?.isFile)
// await client.uploadFrom("README.md", "README_FTP.md")
await client.downloadTo("readme2.txt", 'reademe.txt')
}
catch(err) {
console.log(err)
}
client.close()
}
`
and error message:
`
6 | /**
7 | * Describes an FTP server error response including the FTP response code.
8 | */
9 | class FTPError extends Error {
10 | constructor(res) {
11 | super(res.message);
^
FTPError: 550 No such file.
code: "550"
at new FTPError (/Users/babpulss/vscode-project/ftp/node_modules/basic-ftp/dist/FtpContext.js:11:9)
at _onControlSocketData (/Users/babpulss/vscode-project/ftp/node_modules/basic-ftp/dist/FtpContext.js:283:39)
at addChunk (node:stream:1940:43)
at readableAddChunk (node:stream:1894:59)
at data (node:net:52:17)
`
Did you run the exact same code also on Nodejs? Are you getting the same errors there?
This library does not actively support Bun. If there is no issue on Nodejs, I'll close this ticket.
yes, very well woking on nodejs
thanks for your open source and effort