question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import Wallet returns undefined / Add named Wallet export

See original GitHub issue

When importing the Wallet library in a plain nodeJS application like this const { Wallet } = require('ethereumjs-wallet') Wallet is undefined.

Workaround: declare "type": "module" in package.json and import like this:

import ethereumjs from 'ethereumjs-wallet';
const Wallet = ethereumjs.default

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ryaniocommented, Jan 29, 2021

ah it looks like the readme might need to be fixed.

this should work out of the box:

const Wallet = require('ethereumjs-wallet').default

0reactions
ryaniocommented, Oct 8, 2021

the readme is fixed now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add named export for Wallet class by ryanio · Pull Request #145 ...
This PR adds a named export for the Wallet class to match the README docs. ... Import Wallet returns undefined / Add named...
Read more >
Attempted import error: 'Wallet' is not exported from '@project ...
Perhaps due to using nextjs? Nvm, import Provider, Program with require does not err. Just the Wallet is undefined.
Read more >
btcnano-wallet-client - npm
This package communicates with BWS Btcnano wallet service using the REST API. All REST endpoints are wrapped as simple async methods.
Read more >
Migration Guide - wagmi
Guide for how to migrate to new versions of wagmi.
Read more >
Address editor ⛑️ | minerstat help
Using the created tags​​ Here, navigate to the worker's config and select the Simple tab. Then click the "Select pool" or "Select wallet"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found