content icon indicating copy to clipboard operation
content copied to clipboard

usage with target: "server"

Open oprtask-rb opened this issue 4 years ago • 3 comments

Is this intended to be used with target: "server"?

This error is logged in the console and breaks the site when used with target: "server" (yes, target server is needed because I need pages to be ssr'd) TypeError: Cannot read properties of undefined (reading 'dbHash')

oprtask-rb avatar Oct 27 '21 07:10 oprtask-rb

@oprtask-rb As written in Issue template, reproduction is helpful for other people to find what you are facing at.

nozomuikuta avatar Oct 27 '21 09:10 nozomuikuta

@oprtask-rb As written in Issue template, reproduction is helpful for other people to find what you are facing at.

Hi.

The template is this one: https://content.nuxtjs.org/examples/tailwindcss-typography

but in nuxt.config.js instead of target: "static", I changed it to target: "server". Once this happens (after build & starting the app, ofcourse), it spits that error in the console that I've shown above.

In a larger app this error cause the app to break.

oprtask-rb avatar Oct 27 '21 10:10 oprtask-rb

I'm facing the same issue.

I'll add that in my case I also have ssr: false, which I need because I'm using web components.

nuxt dev works. nuxt generate && nuxt start when building statically works. nuxt build && nuxt start doesn't work.

The console log is <hash>.js:1 GET http://localhost:3000/_nuxt/content/db-<hash>.json 404 (Not Found)

eddybrando avatar Feb 17 '22 16:02 eddybrando

I'm facing the same issue. Has anyone solved it?

HoshinoSuzumi avatar Jun 12 '23 09:06 HoshinoSuzumi