Skip to content

Error : the package F:\xyz\hashgraphsdk\node_modules\@hashgraph\sdk\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (F:\xyz\hashgraphsdk\node_modules\@hashgraph\sdk\lib\index.cjs. Indeed, none of these files exist: #312

Closed
@ShivaSunny9

Description

@ShivaSunny9

when I am trying to use examples of Hashgraph JS SDK, in my react-native project. I am getting this error.
How do I solve this now?
169

my package.json for reference
{
  "name": "hashgraphsdk",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@hashgraph/sdk": "^2.0.9",
    "dotenv": "^8.2.0",
    "react": "16.13.1",
    "react-native": "0.63.4"
  },
  "devDependencies": {
    "@babel/core": "^7.12.10",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.15.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.64.0",
    "react-test-renderer": "16.13.1"
  },
  "jest": {
    "preset": "react-native"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions