Skip to content
Discussion options

You must be logged in to vote

setPreviewData can only be used in Next.js API routes (pages/api/*) not inside of Vercel API routes as this is a Next.js feature / integrated into Next.js. Potentially you're incorrectly typing your Next.js API route, it NextApiRequest and NextApiRequest from 'next':

import { NextApiRequest, NextApiRequest } from 'next'

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Vadorequest
Comment options

@Vadorequest
Comment options

Answer selected by timneutkens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #13593 on May 30, 2020 18:48.