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
Next.js, node.js 16 TypeError: Cannot set property Request of #<Object> which has only a getter #5601
Comments
I'm having the same issue. Just noticed it yesterday. I am also using Next.js. Se also: this Stack Overflow issue. |
Yeah for now I have also downgraded to version 1.7.4 .... then it is working |
Same here. But let's be a bit more helpful in reporting what's wrong instead of just "I get these errors". Exclusively happening when building with Next.js v13.0.2 on Node.js below v18. With Node.js v18 all is fine.
Node.js v18 comes with native To reproduce:
|
@kremalicious Thanks for this info. Our team will be looking this issue, |
Thanks Matthias! I'll update my node.js .. |
Hey there, thanks for reaching out @NishantPacharne and thank you a ton @kremalicious for the detailed response. I have investigated this and created a PR to fix this issue. So next.js will start working properly with node v16, but for now for a quick fix, please switch and use node 18. |
Thank you so much. It took me 10 hours to figure out that it needed a different node version. I deploy on netlify so adding a .node-version file with the version needed (19.1.0 in my case) in the root folder fixed it. |
Nodejs 16 build will work fine for next.js next release, thank you for all of this and will close this. |
using |
@ZeeshanAhmadKhalil will be available in the next version update. in the meantime you can upgrade your node version to get it to work until then. |
@luu-alex switching to node v18 and deleting
|
@ZeeshanAhmadKhalil can i see what your package.json looks like |
This is my package.json file.
I am using
|
was getting the same error but for now degrading web3 version to 1.7.4 works for me |
@asujan205 thank you for letting me know, did this issue happen in a new project or something you've been working on |
Currently Im using node version 18, with next: 13.0.3 and can use
without any errors. @ZeeshanAhmadKhalil hi there, can you create a new issue for this and provide more detail? i'd love to help you out and it'll be more clear in a thread that isn't this one. |
@luu-alex was getting the error if I use but using node 18 and |
yeah it been seen in my recent project |
This is not a Bug Report, Feature Request, or related to Documentation
Is there an existing issue for this?
What's up?
Iam using next js and as soon as I put 'let Web3 = require('web3');'
I get these errors :-
TypeError: Cannot set property Request of # which has only a getter
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Examples/References
No response
The text was updated successfully, but these errors were encountered: