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
nuxt generate static mode calls asyncData and gets payload undefined error 404 page #9448
Comments
Hi @danielroe, i believe i have a simple reproduction here. I've implemented a simple generating of pages based on reading a json file, and generating manually refer to nuxt.config.js (as per my setup) and passing a payload via the generate config. https://github.com/gabrielsze/nuxtStaticTest Expected Behavior: Seen behavior: |
Similar to #9474 |
Should be resolved in #9494 - could you check |
hey @danielroe, thanks for looking into this. so far I've tested multiple situations (as highlighted above), and they seem to work. Looking at the PR, it seems to have handled these edge cases (accent marks, not ascii etc). Works good for me now on |
Hi all, this issue is similar to #9252 and #9425. I've experienced similar behaviors with some interesting findings to I thought to highlight them here, in some hopes of finding people with similar issues. (Edit) Also seems to be related to accent marks as well in #9297.
From my understanding, once a static site is generated in nuxt, there shouldn't be any calls to asyncData on the client side. This works for most of my pages with routes that are dynamically generated, until I noticed some recently making calls to asyncData which results in a 404 error page (since payload is undefined). I narrowed down a few instances on this - one is because of some whitespace in the route URL generated, so
/pages/test1
doesn't call asyncData on client and works fine/pages/test 1
calls asyncData on client and failsAlso, I noticed #9425 and recently had an issue with mandarin URLs generated - I'm not able to localize the behavior for this one because I have some mandarin URLs that consistently work, but ran into the same error (of calling asyncData on client side) and threw an error 404 page as well.
Versions
Reproduction
Steps to reproduce
What is Expected?
nuxt generate
handles the payload so that the data is already loaded on the server-side.What is actually happening?
The text was updated successfully, but these errors were encountered: