Skip to content

ERR_PACKAGE_PATH_NOT_EXPORTED Error while importing @chainsafe/bls/blst-native #160

Open

Description

@ZigBalthazar

Describe the bug
I got this error while import the package in nodejs :

Error: Package subpath './blst-native' is not defined by "exports" in .\node_modules\@chainsafe\bls\package.json

import:

import bls from "@chainsafe/bls/blst-native";

Activity

  1. RaekwonIII commented on Apr 3, 2025

    @RaekwonIII

    I am getting this exact same error. Quite concerning that a year later, this has not received any answers. Does anyone know how to get around it? Is there a fix? @ZigBalthazar

  2. nflaig commented on Apr 3, 2025

    @nflaig
    Member

    @RaekwonIII I agree this is concerning, I am checking with others who are more familiar with the library to see why the latest release which has been out for a while is broken.

    I took a quick look and it seems like even in Lodestar we are not using the 8.x release of this library, you could give v7.1.3 a try and see if it resolves your issue

  3. RaekwonIII commented on Apr 3, 2025

    @RaekwonIII

    @RaekwonIII I agree this is concerning, I am checking with others who are more familiar with the library to see why the latest release which has been out for a while is broken.

    I took a quick look and it seems like even in Lodestar we are not using the 8.x release of this library, you could give v7.1.3 a try and see if it resolves your issue

    Thanks for the fast reply. It does appear like this may be a commonjs/module kind of deal, but I can't quite get around to fixing it.
    I'll try earlier version, the alternative was to try and see if a bundler would have resolved it, but using a bundler for a small nodejs script feels kinda 🤢🤮

  4. nflaig commented on Apr 3, 2025

    @nflaig
    Member

    @RaekwonIII @ZigBalthazar since it seems to me that neither of your use cases requires browser compatibility since you are importing blst-native explicity, it is recommended to use https://github.com/ChainSafe/blst-ts which is what we use in Lodestar.

  5. RaekwonIII commented on Apr 4, 2025

    @RaekwonIII

    Thanks, you are correct, I'll give this a try today!

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

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions