decentralized-identity / ion-sdk

TypeScript SDK for ION
Apache License 2.0
30 stars 14 forks source link

Unable to resolve "multiformats/bases/base64" in React Native #38

Open iamnijat opened 9 months ago

iamnijat commented 9 months ago

Description

When attempting to run my React Native application, I encountered a resolution error related to "multiformats/bases/base64" emanating from the "@decentralized-identity/ion-sdk" dependency.

Issue Details

Upon executing my React Native project, the following error message is displayed:

The error occurs when using the IonDid method from the SDK as shown in the code snippet below:

import { IonDid } from "@decentralized-identity/ion-sdk";

const did = await IonDid.computeDidUniqueSuffix({
    requestID: 2212
});

Steps to Reproduce

  1. Install "@decentralized-identity/ion-sdk" using npm or yarn.
  2. Import and utilize the SDK in a React Native project.
  3. Use the IonDid method as shown in the code snippet above.
  4. Run the project using the React Native CLI or through a platform like Expo.
  5. Observe the aforementioned error message.

Expected Behavior

The expected behavior is for the application to resolve all modules and dependencies without issue and launch without encountering resolution errors related to "multiformats/bases/base64".

Actual Behavior

An error message is displayed, preventing the successful launch of the application: Unable to resolve "multiformats/bases/base64" from "node_modules/@decentralized-identity/ion-sdk/dist/lib/IonKey.js"