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

Module not found: Can't resolve 'fs' in 'node_modules/@aws-sdk/lib-storage/dist/es' #2136

Closed
fedecastelli opened this issue Mar 15, 2021 · 6 comments · Fixed by #2165
Closed
Assignees
Labels
bug This issue is a bug.

Comments

@fedecastelli
Copy link

fedecastelli commented Mar 15, 2021

Describe the bug

Trying to upload a big file using multipart upload. From my React App, I'm using the method Upload from the @aws-sdk/lib-storage@3.8.1 but I'm getting this error:

node_modules/@aws-sdk/lib-storage/dist/es/bytelength.js
Module not found: Can't resolve 'fs' in '/node_modules/@aws-sdk/lib-storage/dist/es'

Your environment

SDK version number

@aws-sdk/client-s3@3.8.1
@aws-sdk/lib-storage@3.8.1

Is the issue in the browser/Node.js/ReactNative?

Node.js

Details of the browser/Node.js/ReactNative version

Node Version: 12.16.3

Steps to reproduce

let credentials = await Auth.currentCredentials();
let paralellUploadS3 = new Upload({
  client: new S3Client({
    apiVersion: '2012-08-10',
    credentials: Auth.essentialCredentials(credentials),
    region: "ca-cenral-1"
  }),
  params: {
    Bucket: 'example-bucket-s3',
    Key: 'key-file.zip',
    Body: myBody
  }
});

An issue was already open but it has been closed without fixing it. Reference to #1688 (comment)

@fedecastelli fedecastelli added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 15, 2021
@70nyIT
Copy link

70nyIT commented Mar 15, 2021

I can confirm, I'm having the same issue on a React App I'm working on.

@70nyIT
Copy link

70nyIT commented Mar 15, 2021

Might reference to #1688 (comment)

@kelvilee
Copy link

Running into the same issue on browser as well. I found downgrading to @aws-sdk/lib-storage@3.7.0 generates a warning instead on missing fs module.

@alexforsyth
Copy link
Contributor

Looking at this right now! I agree this is not ideal at all. We shouldn't even be generating that warning

@trivikr trivikr removed the needs-triage This issue or PR still needs to be triaged. label Mar 18, 2021
@nighttiger1990
Copy link

nighttiger1990 commented Mar 19, 2021

same issue! error occurs instead of warning
SDK version number
@aws-sdk/client-s3@3.9.0
@aws-sdk/lib-storage@3.9.0

@github-actions
Copy link

github-actions bot commented Apr 6, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants