Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class extends value undefined is not a constructor or null (@stricahq/cbors/dist/Decoder.js) #267

Open
sennykalidien opened this issue Aug 18, 2024 · 6 comments

Comments

@sennykalidien
Copy link

sennykalidien commented Aug 18, 2024

When using React w/ Webpack with the latest versions of meshsdk:
"@meshsdk/core": "1.6.8",
"@meshsdk/react": "1.6.8",

I get the following TypeError:
Class extends value undefined is not a constructor or null

Full error message:
TypeError: Class extends value undefined is not a constructor or null at ../../node_modules/@stricahq/cbors/dist/Decoder.js (http://localhost:6006/vendors-node_modules_meshsdk_core_dist_core_-0c8d45.iframe.bundle.js:144431:30) at __webpack_require__ (http://localhost:6006/runtime~main.iframe.bundle.js:28:33) at fn (http://localhost:6006/runtime~main.iframe.bundle.js:434:21) at ../../node_modules/@stricahq/cbors/dist/index.js (http://localhost:6006/vendors-node_modules_meshsdk_core_dist_core_-0c8d45.iframe.bundle.js:145094:17) at __webpack_require__ (http://localhost:6006/runtime~main.iframe.bundle.js:28:33) at fn (http://localhost:6006/runtime~main.iframe.bundle.js:434:21) at ../../node_modules/@meshsdk/core-cst/dist/index.js (http://localhost:6006/vendors-node_modules_meshsdk_core_dist_core_-0c8d45.iframe.bundle.js:40382:74) at __webpack_require__ (http://localhost:6006/runtime~main.iframe.bundle.js:28:33) at fn (http://localhost:6006/runtime~main.iframe.bundle.js:434:21) at http://localhost:6006/vendors-node_modules_node_modules_meshsdk_core_dist_core_-0c8d45.iframe.bundle.js:76461:75

Last known versions when I didn't got this error:
"@meshsdk/core": "1.5.25",
"@meshsdk/react": "1.1.12",

@HinsonSIDAN
Copy link
Member

Any repo can be shared / specific way to reproduce?

@jinglescode
Copy link
Member

@sennykalidien install version 1.6.9, also to ensure that dependencies packages are also up to date, try npm install @meshsdk/core-cst@1.6.9 too

@sennykalidien
Copy link
Author

@HinsonSIDAN I'll create a repo that will reproduce this error later today.
@jinglescode I'll try this and will report back if it worked.

@i-jump
Copy link

i-jump commented Aug 20, 2024

I also encountered this problem and don't know how to solve it

@sennykalidien
Copy link
Author

sennykalidien commented Aug 20, 2024

@HinsonSIDAN I've created a small repo with React, Webpack 5, Babel and Storybook.

in ./storybook/main.js you can find the additional Webpack config needed to work with MeshJS.

@jinglescode I've made sure all dependencies are up to date and installed meshsdk/core-cst@1.6.9. It did not help unfortunately.

Link to repo to reproduce issue: https://github.com/sennykalidien/meshjs-react-example

Packages:

"@meshsdk/core": "^1.6.9",
"@meshsdk/core-cst": "^1.6.9",
"@meshsdk/react": "^1.6.9",
"buffer": "^6.0.3",
"stream": "^0.0.3"

Hope this helps.

@HinsonSIDAN
Copy link
Member

Just done basic investigation, it should be something around package compilation in the strica dependency, so it might not be a quick fix. we will continue investigating workaround and see if there is a more universally clean fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants