Issue Persists After Implementing Official Fix, Diagnosis Incorrect

<I have deployed the exact vercel.json configuration you recommended. It did not work. The issue remained identical (HTML response, empty logs).
Your diagnosis was that my project was using the “Build Output API” because of a .vercel/output directory. This diagnosis is incorrect. That directory does not exist in my project, and my package.json has no build script. The project is a simple static site with serverless functions in the /api directory.
As a final diagnostic step, I have just deployed a version with vercel.json simplified to its bare minimum (containing only the builds configuration). The function still does not execute and the logs remain empty.
!-- Questions that get answered the fastest are the ones with relevant info included in the original post. Be sure to include all detail needed to let others see and understand the problem! →

Expected: A POST request to /api/signin should execute the serverless function and return a JSON response. Vercel logs should show the function execution.
Current: The request receives an HTML page, causing a frontend JavaScript error (Unexpected token 'T'). The Vercel function logs are completely empty, proving the function is never invoked. This occurs on the live production URL.

project name : sistem-abr, team name : this is not team project. but under azaharrabu’s name, deployment URL: sistem-abr.vercel.app, framework:none (static html+node.js function), git cimmit of latest attempt:f38de09a1cccc9e07572820eaf65c2be27e79ebf, key fact : environment variables have been repeatedly verified and are correct

Unexpected token "T" when trying to parse JSON comes from trying to do response.json() on a failed request

You should check the status code of the fetch before trying to parse it

In this case, it’s getting a 404 and the following content, then erroring on the first letter T

The page could not be found

NOT_FOUND

cle1::7ggdq-1764181414679-8a2ab6d6ee56

So the core issue is that /api/signin is not a page. If you go to your latest deployment in the dashboard and look under “Deployment Summary” it only shows static files and no serverless functions, so your vercel.json configuration is making it not deploy the /api routes

When this is working correctly, you’ll see another folder called “Serverless Functions” right below static assets

Vercel has native support for the /api route with functions declared in this way, so you can actually remove the vercel.json entirely and it should pick them up

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.