You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 22, 2025. It is now read-only.
Tried to follow the Next.js guide on your website https://www.rivet.dev/docs/actors/quickstart/next-js/ but ended up having problems. Rivetkit tries to make PUT request to the defined endpoint /api/rivet/[...all]/route.ts
Although when you take a look at the implementation of toNextHandler. It does not export any PUT-method. This seemed quite simple function so I tried guessing and implemented it myself to the route.ts like this:
import{registry}from"@/rivet/registry";import{Registry,RunConfigInput}from"rivetkit";consttoNextHandler=(registry: Registry<any>,inputConfig: RunConfigInput={})=>{// Don't run server locally since we're using the fetch handler directlyinputConfig.disableServer=true;inputConfig.basePath="/api/rivet";const{ fetch }=registry.start(inputConfig);return{GET: fetch,POST: fetch,PATCH: fetch,PUT: fetch,HEAD: fetch,OPTIONS: fetch,};};// Export the Next.js handler for the API routesexportconst{GET,POST,HEAD,PATCH,OPTIONS,PUT}=toNextHandler(registry);
But then I started to get following errors:
level=WARN msg="internal error" error="Offset is outside the bounds of the DataView" stack="RangeError: Offset is outside the bounds of the DataView\n at DataView.prototype.getUint32 (<anonymous>)\n ...