You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been giving Nuxt 3 and Vercel a try and failed at setting Nuxt/content for Vercel. I found some documentation and solved issues related to Nuxt 2, but nothing so far for Nuxt 3.
Has anyone been able to have a Nuxt 3 (universal app) and Nuxt Content working on Vercel ? If so, is there some boilerplate code on the Internet?
My website works well in develop mode but fails when deployed on vercel.
I mainly have two issues :
content folder not baked into the app
content is backed into the app, but queryContent fails with a 500 error code.
First issue : The content folder is not baked into the app -> queryContent will return empty data sets.
As indicated here I first tried to add the content into the build, but the solution described does not seem compatible with the Vercel's options made available by Nitro
I moved the content into the public folder and updated the nuxt.config.js file to tell Nuxt/content to fetch the content from public (see code for the configuration). The content was properly backed into the .output folder, but not in the .vercel\output.
exportdefaultdefineNuxtConfig({content: {sources: {// Override the content sourcecontent: {driver: 'fs',base: resolve(__dirname,'public'),}},},});
Second issue : Event when the content seems to be baked into the app, queryContext fails
Calling queryContext always returns a 500 , 404 errors.
Listing all the content of content (with queryContext().find() returns an empty set.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have been giving Nuxt 3 and Vercel a try and failed at setting Nuxt/content for Vercel. I found some documentation and solved issues related to Nuxt 2, but nothing so far for Nuxt 3.
Has anyone been able to have a Nuxt 3 (universal app) and Nuxt Content working on Vercel ? If so, is there some boilerplate code on the Internet?
My website works well in develop mode but fails when deployed on vercel.
I mainly have two issues :
content
folder not baked into the appcontent
is backed into the app, butqueryContent
fails with a 500 error code.First issue : The
content
folder is not baked into the app ->queryContent
will return empty data sets.content
into the build, but the solution described does not seem compatible with the Vercel's options made available by Nitropublic
folder and updated thenuxt.config.js
file to tell Nuxt/content to fetch the content from public (see code for the configuration). Thecontent
was properly backed into the.output
folder, but not in the.vercel\output
.Second issue : Event when the content seems to be baked into the app,
queryContext
fails500
,404
errors.content
(withqueryContext().find()
returns an empty set.Beta Was this translation helpful? Give feedback.
All reactions