question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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 https://github.com/aws/aws-sdk-js-v3/issues/1688#issuecomment-786726628

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nighttiger1990commented, 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

1reaction
alexforsythcommented, Mar 17, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module not found: Error: Can't resolve 'fs' in - Stack Overflow
js Module not found: Error: Can't resolve 'fs' in 'C:\Source\nien\vital10-frontend\node_modules\tslint\lib' i 「wdm」: Failed to compile.
Read more >
Can't resolve 'fs' in 'node_modules/@aws-sdk/lib-storage/dist ...
Describe the bug Angular project not building because of FS error, is there no way to upload big files to s3 via ......
Read more >
Module not found: Can't resolve 'fs' error [Solved] | bobbyhadz
The error "Module not found: Error: Can't resolve 'fs'" occurs because there has been a breaking change in Webpack version 5.
Read more >
Module not found | Can't resolve 'fs' in Next js application
Join this channel to get access to perks:https://www.youtube.com/channel/UCoSpmr2KNOxjwE_B9ynUmig/joinMy GearCamera ...
Read more >
can't resolve 'fs - You.com | The AI Search Engine You Control
Module not found : Error: Can't resolve 'fs' in '/home/galich/Desktop/projects/mp-test/node_modules/@elrondnetwork/erdjs/out/smartcontracts/typesystem'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found