Open vibhanshu909 opened 3 years ago
Does this still happen on Node 14.16.1 or 16.1.0?
I was using v14.4.0
, so I tried updating to v14.16.1
. After updating, the /graphql
endpoint is working, but now the index page is broken somehow, now If I goto /
page even in development I'm getting 500
and the following error in console.
Cannot read property 'split' of undefined
TypeError: Cannot read property 'split' of undefined
at parse_body (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1333:60)
at respond (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1454:11)
at fetch (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:703:30)
at load (index.svelte:13:30)
at load_node (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:790:30)
at respond$1 (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1011:21)
at async render_page (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1158:20)
at async render (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1477:10)
at async respond (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1450:10)
at async Immediate.<anonymous> (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/chunks/index.js:3304:23)
Unexpected token T in JSON at position 0
SyntaxError: Unexpected token T in JSON at position 0
at JSON.parse (<anonymous>)
at Proxy.<anonymous> (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:762:22)
at async load (index.svelte:22:33)
at async load_node (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:790:12)
at async respond$1 (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1011:15)
at async render_page (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1158:20)
at async render (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1477:10)
at async respond (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/ssr.js:1450:10)
at async Immediate.<anonymous> (file:///home/anonymous/Documents/Sveltekit_Projects/e-commerce/node_modules/@sveltejs/kit/dist/chunks/index.js:3304:23)
Same is happening with v16.1.0
.
I created a new project with
Then to add graphql
everything seems to be working when I'm running
npm run dev
, but when I runnpm run build
, and thennpm run preview
to preview the production build, I'm getting the following error.