-
Notifications
You must be signed in to change notification settings - Fork 27k
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 export builds, but errors in client… #2562
Comments
Agreeing with OP regarding sourcemaps. I cannot find any instructions, examples, or insights on how to turn sourcemaps on for any project in Next.js. Here's a example of outdated, non-applicable, and completely incorrect information about Next.js and source maps:
Without this ability, I will be left with no choice but to abandon using it ever again. I can't fix what I can't see, and without the ability to debug, no other feature NextJS offers is even worth it. |
You can use something like:
Just a feeling, but I wanted to express that I personally don't appreciate the wording you're using. You're using an open source library, countless hours have been put into it, for me most of them without getting anything in return. With comments like these, non-reproducible (you're not providing an example), you're only trying to hurt people, and most maintainers of OSS projects wouldn't even reply / help you with any issues with this kind of tone. |
Since we're now allowed to play psychologist and impose what we think people are trying to do, let's point out a few examples on how this project has handled the sourcemaps problem throughout its history: Here's Next.js justifying why sourcemaps are low priority despite every JS project on Earth needing them
Here's Next.js questioning why anyone would ever want sourcemaps on production, as if the coder asking the question is violating some secret agreement for daring to want a reliable stack trace for production bugs
Here's a disobedient Next.js user baffled on how the project doesn't have reliable sourcemaps. Seems like he's trying to hurt people, too.
And finally, my personal favorite, here's one where Next.js is, once again, justifying why it doesn't feel the need to warn users up front that sourcemaps are in a permanently EXPERIMENTAL state and cannot be relied upon. The reasoning? Oh, well, tone policing matters more than issuing clear and concise warnings about the project's feature set:
And before you continue to play the "Open Source" plausible deniability card, open source means being honest about what it is you are doing. I hope you approve of my PR to make people aware of Next.js's historical policy regarding sourcemaps before they decide to use it. |
Next 5.1 has better support for sourcemaps as I said before, just use next-sourcemaps, we worked on fixing those issues together with @ptomasroos. Again please provide a reproducible example of what isn't working for your particular case so I can have a look into it. |
Expected Behavior
Client side routing, navigation and routing would work.
Current Behavior
Ran
next export
and when I serve locally (and online) there's a client side JavaScript error that breaks all the client side logic.Without sourcemaps (or any other debugging tools?) I can't work out what's happening. Live URL: https://dkfyjniin9u60.cloudfront.net/ (see console in browser).
Not sure I can replicate as yet, as it's larger site - pretty sure the vanilla examples work.
Context
Including the
next.config.js
- possibly this is factoring?Your Environment
The text was updated successfully, but these errors were encountered: