Skip to content

next.config.js redirects causing Uncaught SyntaxError: Unexpected token '<' #24683

Answered by bobarros
alex-r89 asked this question in Help
Discussion options

You must be logged in to vote

It's not properly a bug. By paying attention to what you did, you might see you're redirecting everything.
All requests inside your page it's going to be redirected, like scripts, images, etc.

That's why you're getting errors. All these lines will throw the error that you are mentioning in some clean page, for example:

    <script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1619886952614"></script>
    <script src="/_next/static/chunks/webpack.js?ts=1619886952614"></script>
    <script src="/_next/static/chunks/main.js?ts=1619886952614"></script>
    <script src="/_next/static/chunks/pages/_app.js?ts=1619886952614"></script>
    <script src="/_next/static/chunks/pages/maintenanc…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alex-r89
Comment options

Answer selected by alex-r89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants