PatrickAlphaC / nextjs-smartcontract-lottery-fcc

61 stars 90 forks source link

Issues with [ Moralis, Web3UIKit, implemented Connect Button, Lesson 10] #40

Open hariprasad9899 opened 1 year ago

hariprasad9899 commented 1 year ago

Hello @PatrickAlphaC / Anyone,

I am currently on lesson 10 and I am trying to implement the Smart Contract Lottery UI Connect Button using the web3uikit, but I am encountering an error that says, 'Module not found: Can't resolve 'moralis-v1''. video reference

I have learned that some features of Moralis are deprecated. Could you please guide me on how to proceed from lesson 10? Is there any alternative for Moralis, or can we create the native UI as you did in the Manual Header component? Any suggestions or help would be greatly appreciated."

hariprasad9899 commented 1 year ago

After surfing for several hours. Finally, the connect button web3uikit issue and the moralis-v1 issue was resolved, after using the below dependency versions of the package listed below. Hope this helps someone.

{
    "name": "lottery",
    "version": "0.1.0",
    "private": true,
    "scripts": {
        "dev": "next dev",
        "build": "next build",
        "start": "next start",
        "lint": "next lint"
    },
    "dependencies": {
        "@web3uikit/core": "^0.1.5",
        "@web3uikit/icons": "^0.1.5",
        "@web3uikit/web3": "^0.1.5",
        "autoprefixer": "10.4.14",
        "magic-sdk": "^17.1.3",
        "moralis": "^1.3.2",
        "moralis-v1": "^1.12.0",
        "next": "13.3.4",
        "react": "18.2.0",
        "react-dom": "18.2.0",
        "react-moralis": "^1.3.1",
        "tailwindcss": "3.3.2",
        "web3uikit": "^0.1.75"
    }
}
snnbotchway commented 1 year ago

It helped me I had to install all that web3uikit stuff even though I had not started using them I guess they have a peer dependency that fixes the problem

Yehezkiel-simbuang commented 1 year ago

This is my error :

Have anyone solved this issue? I have an issue when I need to run the header.js only. I cannot find the solution to this issue

sohjag commented 1 year ago

Facing the same issue, upgraded to the exact dependencies mentioned by @hariprasad9899 , but didn't work :/

"dependencies": { "@web3uikit/core": "^0.1.5", "@web3uikit/icons": "^0.1.5", "@web3uikit/web3": "^0.1.5", "autoprefixer": "10.4.14", "magic-sdk": "^17.1.3", "moralis": "^1.3.2", "moralis-v1": "^1.12.0", "next": "13.3.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-moralis": "^1.3.1", "tailwindcss": "^3.3.2", "web3uikit": "^0.1.75" }

Error: Module not found: Can't resolve '@walletconnect/ethereum-provider' in \node_modules\moralis-v1\lib\browser\Web3Connector'

snnbotchway commented 1 year ago

yarn add @walletconnect/ethereum-provider

On Wed, 7 Jun 2023, 7:43 am So J, @.***> wrote:

Facing the same issue, upgraded to the exact dependencies mentioned by hariprasad9899, but didn't work :/

"dependencies": { @./core": "^0.1.5", @./icons": "^0.1.5", @.***/web3": "^0.1.5", "autoprefixer": "10.4.14", "magic-sdk": "^17.1.3", "moralis": "^1.3.2", "moralis-v1": "^1.12.0", "next": "13.3.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-moralis": "^1.3.1", "tailwindcss": "^3.3.2", "web3uikit": "^0.1.75" }

Error: Module not found: Can't resolve @.***/ethereum-provider' in \node_modules\moralis-v1\lib\browser\Web3Connector'

— Reply to this email directly, view it on GitHub https://github.com/PatrickAlphaC/nextjs-smartcontract-lottery-fcc/issues/40#issuecomment-1580120727, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4A7D24G4H3PTCAX7ATE4TXKAWKLANCNFSM6AAAAAAXTS5JQQ . You are receiving this because you commented.Message ID: <PatrickAlphaC/nextjs-smartcontract-lottery-fcc/issues/40/1580120727@ github.com>

sohjag commented 1 year ago

@snnbotchway tried it out. didn't work either

snnbotchway commented 1 year ago

A different error should appear Probably another module you have to install

On Wed, 7 Jun 2023, 12:28 pm So J, @.***> wrote:

@snnbotchway https://github.com/snnbotchway tried it out. didn't work either

— Reply to this email directly, view it on GitHub https://github.com/PatrickAlphaC/nextjs-smartcontract-lottery-fcc/issues/40#issuecomment-1580716082, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4A7DYCSDXEHMIVP73E4DLXKBXWHANCNFSM6AAAAAAXTS5JQQ . You are receiving this because you were mentioned.Message ID: <PatrickAlphaC/nextjs-smartcontract-lottery-fcc/issues/40/1580716082@ github.com>

sohjag commented 1 year ago

strangely no new warnings, but no sign of transaction being sent, when trying to call enterRaffle

arvinzty commented 1 year ago

thanks,it helped me