-
Notifications
You must be signed in to change notification settings - Fork 944
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
Migrate to nextjs 15 #1036
base: main
Are you sure you want to change the base?
Migrate to nextjs 15 #1036
Conversation
Thanks @rin-st I will take a look and test. Maybe some of the extensions have to be updated too, mainly if they use a page param, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good and it seems do not have any missing migration stuff.
Tested and it's working fine.
The first time the compilation took me about 16 seconds and next one about 8 seconds, so it doesn't be an issue there.
I'm getting a deprecation warning after the compilation is done:
✓ Compiled / in 8.1s (7831 modules)
(node:142505) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been testing it on Windows and LGTM! Nice job @rin-st!!🙌
Had a problem when tried to yarn build
but it worked well after deleting my .next
folder
packages/nextjs/app/debug/_components/contract/utilsDisplay.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rin-st! Working great! did some testing and seems great to me! Just added a small comment https://github.com/scaffold-eth/scaffold-eth-2/pull/1036/files#r1926345215 but happy to merge it 🙌
Lol NextJs showing error overlay now for all types of error seems a bit strange, in previous version it was only showing it for "Unhandled error".
Especially the error of Grammarly/colorzilla extension:
Rauch response on it: https://x.com/rauchg/status/1871268516508381412
Similarly when chain is not started it show the error overlay, lol we can't do anything about since nextjs plans to do it that way.
I was researching about this error overlay seems like they are improving this error overlays a lot checkout their changelog the "[DevOverlay]" seem good, probably they will release that in 15.2.x version but looks nice.
Thanks for reviews !
Strange, I don't get that error
Oh yes, forgot to mention it. I don't like it too but dont know for now how to fix this
Probably we need to wait until 15.2 then because for now it shows red error button for every contract error, even when there is a |
lol I figured this out. It shows error button for every |
I think its shows up if you use latest node version?
Ohh I think it won't be solved in 15. 2 as well, "I think" because (I wasn't able to find the changeset were they discussed) NextJs plan to move this way in future showing console.error in that overlay as well. In 15.2 I think they are improving the styles of it a lot and making it more better.
Umm regarding this, probably I think we shouldn't change all console.error to console.warning, since its only show in dev environment its fine? Maybe instead of converting all console.error to console.warning we only change the sensible ones? Like for example Showing write contract error, we shouldn't give overlay (i.e console.error) because we are already showing toast and we could give full error in console with warn? maybe we can wait for 15.2 @rin-st and see what say? if it improves? Because I see they are moving fast with 15.2 canary and probably release new version soon? If the overlay is still their for console.error then we take the decision where to put console.war and where to use console.error? |
Yes, let's wait! Thanks! |
Next 15 what's new and migration guides here
codemods used:
react:
main migration codemod
types-react-codemod
nextjs:
async request api
Plus changed the next config file
Note: After updating deps, compile times for se-2 homepage were crazy 60-100 seconds, but then the problem eventually disappeared. Currently compile times in dev mode for me is like 8-13sec. Hopefully, for you it will work fine from the start
Things I thought about but decided it's not worth it
--turbo
are almost the same . I think it's better just to wait until it will become default for nextjsTODOs after migration to next15
Fixes #1033