mattjennings / sveltekit-blog-template

A SvelteKit blog template
https://sveltekit-blog-template.vercel.app
MIT License
229 stars 35 forks source link

Unexpected token < in JSON at position 0 #10

Closed souravjamwal77 closed 2 years ago

souravjamwal77 commented 2 years ago

Hi,

I'm getting below error on console while loading the posts page. I have all the required dependencies and dev-dependencies. I searched on Google and Stackoverflow but the only answer I found was that my request is returning an HTML response instead on JSON.

Can you please point me in the right direction?

Unexpected token < in JSON at position 0 SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at Proxy.<anonymous> (file:///home/souravjamwal77/Desktop/Github_Projects/sourav.fun/svelte_sourav.fun/.svelte-kit/runtime/server/index.js:1749:21) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async load ([...page].svelte:20:22) at async load_node (file:///home/souravjamwal77/Desktop/Github_Projects/sourav.fun/svelte_sourav.fun/.svelte-kit/runtime/server/index.js:1778:12) at async respond$1 (file:///home/souravjamwal77/Desktop/Github_Projects/sourav.fun/svelte_sourav.fun/.svelte-kit/runtime/server/index.js:2120:15) at async render_page (file:///home/souravjamwal77/Desktop/Github_Projects/sourav.fun/svelte_sourav.fun/.svelte-kit/runtime/server/index.js:2321:19) at async resolve (file:///home/souravjamwal77/Desktop/Github_Projects/sourav.fun/svelte_sourav.fun/.svelte-kit/runtime/server/index.js:2564:11) at async respond (file:///home/souravjamwal77/Desktop/Github_Projects/sourav.fun/svelte_sourav.fun/.svelte-kit/runtime/server/index.js:2497:20) at async file:///home/souravjamwal77/Desktop/Github_Projects/sourav.fun/svelte_sourav.fun/node_modules/@sveltejs/kit/dist/chunks/index.js:244:24

mattjennings commented 2 years ago

Sorry, I missed this. If you're still experiencing this can you provide a reproduction? I have not been able to reproduce this.

If you can provide a repro I'll re-open this and take a look.