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

Fails to build for web worker environment #89

Closed
3 tasks done
vasco-santos opened this issue Apr 19, 2022 · 1 comment
Closed
3 tasks done

Fails to build for web worker environment #89

vasco-santos opened this issue Apr 19, 2022 · 1 comment

Comments

@vasco-santos
Copy link

โœ… Prerequisites

  • Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
  • Are you running the latest SDK version?
  • Are you reporting to the correct repository (@magic-sdk/admin)?

๐Ÿ› Description

Since version 1.4.1 as a result of #88 fails to build in web workers due to https://git.coolaj86.com/coolaj86/atob.js/issues/5 .

Fails with:

ReferenceError: window is not defined
    at ../../node_modules/.pnpm/atob@2.1.2/node_modules/atob/browser-atob.js (/Users/vsantos/work/pl/gh/nftstorage/nftstorage.link/packages/api/dist/worker.mjs:2363:8)
    at __require (/Users/vsantos/work/pl/gh/nftstorage/nftstorage.link/packages/api/dist/worker.mjs:8:50)
    at /Users/vsantos/work/pl/gh/nftstorage/nftstorage.link/packages/api/dist/worker.mjs:5122:27

๐Ÿงฉ Steps to Reproduce

  1. Install in a web worker project
  2. Build using ESM (or any other)

๐Ÿค” Expected behavior

ESM Build works

๐Ÿ˜ฎ Actual behavior

ESM build fails

๐Ÿ’ป Code Sample

[If possible, please provide a code repository, gist, code snippet or sample files to reproduce the issue.]

๐ŸŒŽ Environment

Software Version(s)
@magic-sdk/admin 1.4.1
Node 16.3.0
yarn
Operating System
@justinnout
Copy link
Contributor

This seems to be addressed according to this thread: https://git.coolaj86.com/coolaj86/atob.js/issues/5. Closing for now unless issue needs to be reopened!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants