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

Adding vercel.json breaks Vercel deployments

$
0
0

Adding a vercel.json file with the following cron job breaks Vercel deployments on master in my SvelteKit project.

{"crons": [    {"path": "/api/cron","schedule": "* * * * *"    }  ]}

With no logs or anything to indicate what the issue is.

I have a cron job setup in /src/routes/api/cron/+server.js

import { invalidate } from "$app/navigation"export function GET(req) {  if (req.headers.get('Authorization') === `Bearer ${process.env.CRON_SECRET}`) {    invalidate('calendar:load')    return new Response("Success!")  } else {    return new Response('Not found', {      status: 404    })  }}

It seems like there is a configuration issue that's causing a completely silent fail.


Viewing all articles
Browse latest Browse all 1541

Trending Articles



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