Content is not loaded after generate
See original GitHub issueEnvironment
- Operating System:
Linux
- Node Version:
v16.15.0
- Nuxt Version:
3.0.0-rc.4
- Package Manager:
npm@8.5.5
- Builder:
vite
- User Config:
css
,build
,typescript
,modules
,components
- Runtime Modules:
@nuxt/content@2.0.1
,unplugin-icons/nuxt
- Build Modules:
-
Reproduction
https://stackblitz.com/edit/github-jdzmbl?file=components/Feed.vue
- Open stackblitz
- There are generated .output by
npm run generate
. I don’t know how to execute the generation command in stackblits, so I generated the files locally and put them in the project. You should get the same result by regenerating. - Run
npm run preview
- On
/
path you should see valid JSON array with content. But on subpath you should see HTML instead JSON
Describe the bug
I have several pages to display the content. In the desktop, the filtered JSON is displayed correctly on each page. However, after generating the site, HTML is returned instead of JSON
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Make loader gone after content is loaded - Stack Overflow
What i'm trying to accomplish is whenever the contents inside the tab is fully loaded my loader animation will disappear i tried adding...
Read more >7 Ways to Fix Google Chrome Not Loading Images - MakeUseOf
The easiest fix is to rename the current data folder so that Chrome will create a new one. If you're using Windows 10,...
Read more >Fix Lazy-Loaded Website Content | Google Search Central
Deferring loading of non-critical or non-visible content, also commonly known as "lazy loading", is a common performance and UX best practice.
Read more >If Safari on Mac doesn't open a webpage or isn't working as ...
Check Safari settings. The webpage might not be compatible with one or more browser settings, which you can turn on or off as...
Read more >Error 404 not found - What does it mean & how to fix it! - IONOS
Reload the page: It might be that the error 404 has appeared for the simple reason that the page did not load properly....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try serving generated files using
npx serve ./output/public
.Seems that serving with
yarn nuxi preview
cause this issue.@danielroe Do you know what could have caused this issue?
The
-s
enables fallback toindex.html
if it doesn’t find an exact match. Maybe there is a bug inserve
with query parameters?