Next.js Discord

Discord Forum

I'm trying to fix an issue in a Solana NextJS simple system.

Unanswered
Elm sawfly posted this in #help-forum
Open in Discord
Elm sawflyOP
It is a simple system to teach about Web3 to newcomers. Problem is that the packages used are a bit old. My goal is to bring the system to a more modern (npm) environment.
The error is : "Error: Hydration failed because the initial UI does not match what was rendered on the server."
The code is here: https://github.com/ttsoares/Solana_Pay_2

4 Replies

@Elm sawfly i have an experience with Thirdweb Solana SDK with Next.js. may i see the error message? Hydration error means that the prerendering page(HTML) did not match the initial rendering on client side. So it is not Solana specific issue but typical issue on Next.js that bigginers often face.
In Next.js, even client components are prerendered. i.e. functions are executed on the server side(Node.js) and cached.
Elm sawflyOP
@tafutada777 Thank you for your fast reply ! Appreciated...
I kind of solve the issue downgrading React from 18 to 17, same code. The repository that generate the errors is: https://github.com/ttsoares/Solana_Pay_2
(there is an .env with NEXT_PUBLIC_OWNER_PUBLIC_KEY)
The original source of this bootcamp is:
https://github.com/w3b3d3v/buildspace-projects/tree/web3dev-version/Solana_Pay_Store/en
glad to here that. just notice Next.js 13 supports React 18.2.0+
plus you can visit Thridweb Discord to get people who knows React and Solana.
Elm sawflyOP
OK. Thank you again.
Do you think that there is a chance of this system runs in the 13th version of Next ?
Will check it out this channel right now.