web3 / web3.js

Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.
https://web3js.org/
Other
19.24k stars 4.93k forks source link

Uncaught TypeError: Class extends value undefined is not a constructor or null #6371

Closed khalidmaquilang closed 1 year ago

khalidmaquilang commented 1 year ago

Expected behavior

Web3 should be run without error in vuejs.

Actual behavior

it displays image

Steps to reproduce the behavior

  1. Fresh installed Laravel
  2. Install Jetstream
  3. Install Inertiajs

Environment

"@inertiajs/vue3": "^1.0.0",
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/typography": "^0.5.2",
"@vitejs/plugin-vue": "^4.0.0",
"autoprefixer": "^10.4.7",
"axios": "^1.1.2",
"laravel-vite-plugin": "^0.8.0",
"postcss": "^8.4.14",
"tailwindcss": "^3.1.0",
"vite": "^4.0.0",
"vue": "^3.2.31"
"web3": "^4.1.0"
jdevcs commented 1 year ago

@khalidmaquilang could you create a sample project repo or online create sandbox using some tool like https://codesandbox.io/ with this error?

0xGoenka commented 1 year ago

@jdevcs https://github.com/estebanadams/react-web3

Here is a repo reproducing, I got the exact same problem

0xGoenka commented 1 year ago

@khalidmaquilang ching web3js version 1.10.0 fixed the pb for me

khalidmaquilang commented 1 year ago

@khalidmaquilang ching web3js version 1.10.0 fixed the pb for me

actually i fixed it by downgrading but i want to use the latest.. thanks for producing a repo.. please investigate it @jdevcs

jdevcs commented 1 year ago

We will schedule it in next sprint starting tomorrow. cc: @mconnelly8 ?

0xGoenka commented 1 year ago

If you can put the MR link after you fixed in this comment, it would be great, I'm curious about what is the problem :)

Le lun. 28 août 2023 à 22:52, Junaid @.***> a écrit :

We will schedule it in next sprint starting tomorrow. cc: @mconnelly8 https://github.com/mconnelly8 ?

— Reply to this email directly, view it on GitHub https://github.com/web3/web3.js/issues/6371#issuecomment-1696305592, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXUMFVL6TH47VRR36VHPNTXXTZIRANCNFSM6AAAAAA3XJY2YI . You are receiving this because you commented.Message ID: <web3/web3. @.***>

LingTaixu commented 1 year ago

why don't you give it a try npm i events or yarn add events

Muhammad-Altabba commented 1 year ago

Hello @estebanadams, I just want to say that as @LingTaixu suggested, running yarn add events or npm i events (adding "events": "^3.3.0" to your dependencies at package.json), will fix the issue. So, you can use this for now as a quick fix. However, we will investigate further for the best solution.

Hi @LingTaixu, Many thanks for your suggestion. And actually, it is events and not event. So, I edited your comment to fix this :smile: