Next.js Discord

Discord Forum

This destroyed my noobish brain!

Answered
White-horned horntail posted this in #help-forum
Open in Discord
White-horned horntailOP
So I recently started with react, jumped to vite and now I am trying to build some next with TS and TW.
Got this strange thing though.
Errors where there are no errors. Dev works fine but for some reason one page breaks all of a sudden.
Using App-router, pages for about, contact etc resides in named folders with a page.tsx inside. Using Prismic as CMS.
Is this a common error? I heard Next could be an *** sometimes but this is only annoying.
Lost like 2 hours cause of this non-error. :/
Ty for help!
Answered by White-horned horntail
Turns out I had to manually uninstall everything that has to do with vs code (%userprofile%\AppData\Roaming\Code and %userprofile%.vscode)
Works now it seems.
View full answer

27 Replies

have you tried restarting vscode (i don't think thats the issue tho)
@riský have you tried restarting vscode (i don't think thats the issue tho)
White-horned horntailOP
Yeah, tried that, I'm gonna restart the whole system now, thanks!
also you may need this line... but as one works with nearly identical code, idk https://github.com/vitejs/vite/blob/main/packages/create-vite/template-react-ts/tsconfig.json#L15C1-L15C24
but are you using vite or nextjs? you mention each other and im confused... (they can't be used at the same time iirc)
and if you completely copy the code to the other page, it still errors?
@riský and if you completely copy the code to the other page, it still errors?
White-horned horntailOP
Yeah, I've tried both directions, from a working one too this one, might just delete the folder and make a new one
😭 also try removing .next and then nodemodules and reinstalling
White-horned horntailOP
Ah yeah, such a bummer this. Weird!
unless you have a weird theme, i would say that the one on the left also has issues because field wouldn't be normally green
White-horned horntailOP
lol, deleted the folder, copied the code from about, made a new folder and the "error" persists 🙂
still working when running dev tho
what about delete file and copy other file :meow_peek:
@riský what about delete file and copy other file <:meow_peek:763826915991224381>
White-horned horntailOP
I'm afraid to do that, I am checking all my versions atm, AI gave me some tips 🙂
Updated node and next, still no luck 🙂
and I tried to copy the 'contact' to a new file in another folder, no problem 🙂
im thinking something was not quite right in the name... but 🤷
White-horned horntailOP
nah 🙂 it breaks at the react-thingeys
<></>
so, one time it works, not not another 😭
White-horned horntailOP
dont know why 🙂 will keep the thread, if someone else has an explanation, truly gutted. Have not checked prismic yet, gonna look at that now.
Jersey Wooly
try using <React.Fragment> instead of <>
@Jersey Wooly try using `<React.Fragment>` instead of `<>`
White-horned horntailOP
will do
@Jersey Wooly try using `<React.Fragment>` instead of `<>`
White-horned horntailOP
no luck 😭
will probably be fine if I make a new project, but ugh 🙂
could lint be bugging? Could try to reset code to get rid of extensions.
White-horned horntailOP
Disabled all extensions, no luck
White-horned horntailOP
Turns out I had to manually uninstall everything that has to do with vs code (%userprofile%\AppData\Roaming\Code and %userprofile%.vscode)
Works now it seems.
Answer