Import Wallet returns undefined / Add named Wallet export
See original GitHub issueWhen 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:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top 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 >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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ah it looks like the readme might need to be fixed.
this should work out of the box:
const Wallet = require('ethereumjs-wallet').default
the readme is fixed now