Cannot read property 'wordlists' of undefined
See original GitHub issueUpgrading from 2.6.0 to 3.0.2 - nothing is accessible anymore through the following method (the one mentioned in the README):
import bip39 from "bip39"; // equivalent of const bip39 = require("bip39");
console.log(bip39.wordlists); // --> bip39 is undefined as it doesn't have a default export
It is however accessible by using:
import { wordlists } from "bip39";
console.log(wordlists);
or
import * as bip39 from "bip39";
console.log(bip39.wordlists);
Just an FYI as this change is quite breaking for some applications (including the ones I was working on) but it was nowhere documented
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Cannot read property 'handleCorrectAnswers' of undefined ...
I get an TypeError: Cannot read property 'handleCorrectAnswers' of undefined error. this.handleCorrectAnswers = this.handleCorrectAnswers.bind( ...
Read more >cannot read properties of undefined (reading '__h') - You.com
Your issue is that your .find() method is returning undefined, so you can't access properties on product such as .name as it is...
Read more >bip39 - npm
When a checksum is invalid, warn the user that the phrase is not something generated by your app, and ask if they would...
Read more >Custom edit mode generate eror: Uncaught TypeError
Custom edit mode generate eror: Uncaught TypeError: Cannot read property '$keywordList' of undefined ... callback(null, wordList.map(function(word) {.
Read more >TypeError: Cannot read property 'voice' of undefined-discord.js
[Solved]-UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'voice' of undefined-discord.js ... It checks if the user is in any voice channel. If ...
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
import bip39 from “bip39”;
is equivalent to
const bip39 = require(‘bip39’).default
you want
import * as bip39 from “bip39”;
Also, the README states
const bip39 = require('bip39')
The README does not state
import bip39 from "bip39";