Skip to content

[Dependency Issue] Isomorphic-unfetch: invalid path for export in package.json #95

@alinasir85

Description

@alinasir85

Hi,

There's an export issue in unfetch version 5 which is mentioned in below PR but its not merged since February 2023

developit/unfetch#164

Toucan-sdk is using "isomorphic-unfetch": "^4.0.2" which internally using unfetch version 5 thus causing below issue while bundling:

**✘ [ERROR] Could not resolve "unfetch"

../../../../fireblocks/node_modules/isomorphic-unfetch/index.js:7:14:
  7 │     ? r(require("unfetch"))
    ╵                 ~~~~~~~~~

The module "./index.js" was not found on the file system:
../../../../fireblocks/node_modules/unfetch/package.json:19:17:
19 │ "default": "./index.js"
╵ ~~~~~~~~~~~~
You can mark the path "unfetch" as external to exclude it from the bundle, which will remove this
error. You can also surround this "require" call with a try/catch block to handle this failure at
run-time instead of bundle-time.**

Kindly fix it using alternative library or downgrade isomorphic-unfetch to 4.0.0 which solves the issue until PR gets merged

Activity

aspiers

aspiers commented on Nov 14, 2023

@aspiers
Member

Thanks a lot for the report, I have filed an internal ticket to track this (currently only visible by team members - apologies for that).

To clarify, is this breaking installation of the SDK for you, or just certain functionality? Thanks again!

alinasir85

alinasir85 commented on Nov 14, 2023

@alinasir85
Author

Package is not able to build/bundle due to "unfetch" dependency not being resolved in the latest version.
Had to use version "1.0.0-beta" of toucan-sdk which uses older version of "unfetch" library, hence solving issue

pheuberger

pheuberger commented on Nov 29, 2023

@pheuberger
Contributor

@alinasir85 which bundler are you using so I can test the behavior?

0xmichalis

0xmichalis commented on Oct 9, 2024

@0xmichalis
Member

Fixed by #104 and published in 1.0.6-beta

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @aspiers@0xmichalis@pheuberger@alinasir85

        Issue actions

          [Dependency Issue] Isomorphic-unfetch: invalid path for export in package.json · Issue #95 · ToucanProtocol/toucan-sdk