typescript-sdk icon indicating copy to clipboard operation
typescript-sdk copied to clipboard

[Bug]: Attempted import error: 'File' is not exported from '@web-std/file' (imported as 'File$1').

Open quytxv opened this issue 3 years ago • 4 comments

Prerequisites

  • [x] I have checked that @thirdweb-dev/sdk is on the latest stable version and the bug still exists.
  • [x] I have checked existing issues and I was unable to find a duplicate of this.

Describe the bug After I upgraded from v2.1.3-0 to v2.3.38, I'm stuck while building the app with react-app-rewired , error happened.

Failed to compile.

./node_modules/@thirdweb-dev/sdk/dist/browser/index.mjs
Attempted import error: 'File' is not exported from '@web-std/file' (imported as 'File$1').

quytxv avatar Aug 23 '22 05:08 quytxv

Thanks for reporting this. We're currently working on a new storage package with better separation between node and browser environments. That should fix this issue. Will keep you updated. cc @adam-maj

joaquim-verges avatar Aug 23 '22 05:08 joaquim-verges

@joaquim-verges I think this issue was fixed by following release, right? https://github.com/thirdweb-dev/typescript-sdk/releases/tag/v2.3.39

But another issue occurred.

Failed to compile.

./node_modules/@thirdweb-dev/react/dist/thirdweb-dev-react.browser.esm.js
Attempted import error: 'IpfsStorage' is not exported from '@thirdweb-dev/sdk/dist/browser'.

quytxv avatar Aug 26 '22 04:08 quytxv

@quytxv that error should be fixed in the latest react version

joaquim-verges avatar Aug 29 '22 04:08 joaquim-verges

Thanks for your reply. In the latest react version(18.2.0), this error occurred.

./node_modules/@thirdweb-dev/sdk/dist/browser/index.js
Module not found: Can't resolve './aes' in '_[my path]_/node_modules/@thirdweb-dev/sdk/dist/browser'

quytxv avatar Aug 29 '22 08:08 quytxv