Skip to content

Bug: @coinbase/onchainkit throws error when building #2531

@Kennybabs-py

Description

@Kennybabs-py

Describe the bug and the steps to reproduce it

  1. Run yarn build or npm run build
  2. The bug is originating from the @scure/bip32 pkg.
  3. The pkg removed 'abytes' from the exports
  4. Current version of viem still exports it
  5. The build error is as follows: ./node_modules/@scure/bip32/lib/esm/index.jsAttempted import error: 'abytes' is not exported from '@noble/hashes/utils' (imported as 'abytes').Import trace for requested module:
    ./node_modules/@scure/bip32/lib/esm/index.js
    ./node_modules/viem/_esm/accounts/index.js
    ./node_modules/porto/dist/viem/Account.js
    ./node_modules/porto/dist/index.js
    ./node_modules/@wagmi/connectors/dist/esm/porto.js
    ./node_modules/@wagmi/connectors/dist/esm/exports/index.js
    ./node_modules/wagmi/dist/esm/exports/connectors.js
    ./node_modules/@coinbase/onchainkit/dist/DefaultOnchainKitProviders.js
    ./node_modules/@coinbase/onchainkit/dist/OnchainKitProvider.js
    barrel_optimize?names=OnchainKitProvider!=!./node_modules/@coinbase/onchainkit/dist/index.js

What's the expected behavior?

A successful build after running the 'yarn build' command

What version of the libraries are you using?

  • @coinbase/onchainkit: "1.1.1"
  • viem: "2.38.4"
  • wagmi: "2.19.0"

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

    Issue actions