dapp-core
dapp-core copied to clipboard
Class extends value undefined is not a constructor or null
When using import { DappUI, useGetLoginInfo } from '@elrondnetwork/dapp-core';
I get the following error in console:
Uncaught TypeError: Class extends value undefined is not a constructor or null
at module.exports (keccak.js:5:1)
at module.exports (index.js:6:1)
at ./node_modules/keccak/js.js (js.js:1:1)
at options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./node_modules/@elrondnetwork/erdjs/out/signableMessage.js (signableMessage.js:12:1)
at options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
I can't manage to find a solution, all that I'm doing is importing the library
Edit: In a TypeScript project it works, but in a simple JS react-app doesn't work
This error usually indicates a circular dependency. Can you check if you have any dependencies in your app?
@dragoscv any progress on this?
@dragoscv any progress on this?
Just use their template. Or start a create-react-app with TypeScript. It doesn't work if your project is built in plain JavaScript. I've built my app using their template and migrated my other template into this
I'm not sure I understand. Whos template? Why doesn't it work? You mean importing dapp-core into an app using plain js, no Typescript?
It was fixed some time ago. Please use the latest version