Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

server crashes when i try to fetch API from +page.ts in SvelteKit

$
0
0
import { getCustomerSupportsApi } from 'rpc';export async function load() {    try {        const data = await getCustomerSupportsApi();        return { data };    } catch (error) {        console.error('Error occurred while loading customer supports:', error);        return { data: null };    }}

this is my +page.ts code, whenever i save after writing this code, node server crashes

I tried to fetch the api from +page.ts to +page.svelte but the server crashes whenever i try to run it.


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>