js-ipfs
js-ipfs copied to clipboard
globalThis Error in Safari
- Version: "ipfs-core": "^0.12.2"
- Platform: Darwin amrap030-mbp-37305.fritz.box 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64
Severity: High
Description:
When using ipfs-core
in a Vue 3 Application, everything works fine in Chrome and Firefox. However, in Safari Version 12.0 (14606.1.36.1.9) I am getting the following error: ReferenceError: Can't find variable: globalThis
and the UI is not loading anymore.
Steps to reproduce the error:
You can reproduce the error by using the following repository: https://github.com/amrap030/ipfs-safari
You just need to run npm install
and then npm run serve
You should get the error when running the current state of the repository. After removing everything related to ipfs in this file, the application ui loads as expected and the error is gone.
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
- "Priority" labels will show how urgent this is for the team.
- "Status" labels will show if this is ready to be worked on, blocked, or in progress.
- "Need" labels will indicate if additional input or analysis is required.
Finally, remember to use https://discuss.ipfs.io if you just need general support.
js-ipfs is being deprecated in favor of Helia. You can https://github.com/ipfs/js-ipfs/issues/4336 and read the migration guide.
Please feel to reopen with any comments by 2023-06-02. We will do a final pass on reopened issues afterward (see https://github.com/ipfs/js-ipfs/issues/4336).
This issue is most likely resolved in Helia, please try it out!