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

no such file or directory, scandir... #49

Open
Kostanos opened this issue May 24, 2018 · 4 comments
Open

no such file or directory, scandir... #49

Kostanos opened this issue May 24, 2018 · 4 comments

Comments

@Kostanos
Copy link

I get the error if I want to getList of empty bucket:

s3 = AWSMock.S3({Bucket: 'my-bucket'});
s3.listObjects({Bucket: 'my-bucket', Prefix: 'new-one/'}, (data)=>{
        console.log(data);
      });

Error: ENOENT: no such file or directory, scandir '/tmp/buckets//my-bucket'
@mathieuedet
Copy link

Hi,

Maybe to late but your error is double slash between "/tmp/buckets/" and "my-bucket"
When you remove one slash, it should access to /tmp/bucket/ folder on your computer :)

@thejuan
Copy link

thejuan commented May 8, 2020

Maybe related, I get a similiar error when listing with a prefix that does not exist on disk

ENOENT: no such file or directory, scandir '/tmp/buckets/XHKKDXE82PH8KP/test'

/tmp/buckets/XHKKDXE82PH8KP exists, but test doesnt

@thejuan
Copy link

thejuan commented May 8, 2020

I may have been removing the buckets dir, i make sure its there in setup now

@zxlin
Copy link

zxlin commented Jan 22, 2021

This is because your bucket doesn't exist. You have to upload at least one file or call createBucket() before you can run listObjects()

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

No branches or pull requests

4 participants