Next.js Discord

Discord Forum

direct links

Answered
Willow Ptarmigan posted this in #help-forum
Open in Discord
Avatar
Willow PtarmiganOP
I probably have an issue with understanding how nextjs works in the "routing" regard. So my problem is i have a [...slug].js file within the pages routing system. In local dev i can get to that page and it works fine when i click through from the starting page of my application through a next/link <Link> ... however if i refresh that page using e.g. the browser refresh i just get unexpected token '<' errors for all the js files etc. What is going on here and what could be the issue ? I am using nextjs 14.
Answered by Willow Ptarmigan
ok after struggling for a long time i had:
assetPrefix: './',
in the next.config.js which seemed to cause this.
View full answer

1 Reply

Avatar
Willow PtarmiganOP
ok after struggling for a long time i had:
assetPrefix: './',
in the next.config.js which seemed to cause this.
Answer