jindequan  
                (Jindequan)
               
                 
                 
              
                  
                    July 16, 2025,  5:25am
                   
                   
              1 
               
             
            
              
As you see, I’ve deployed my project successfully,  and my vercel.json is
{
  "rewrites": [
    {
      "source": "/(.*)",
      "destination": "/index.html"
    }
  ]
}
 
and this code in hello.cjs
module.exports = function (req, res) {
  res.status(200).send('Hello from Vercel Serverless Function (CommonJS)!');
};
 
when I requst my api, page shows:
Unexpected Application Error!
404 Not Found
 
It’s running in vercel dev.  Only fail when deployed to prod.
Of cource in deployment I can see no functions injected, and also I’ve tried other js format: ts, js .etc 
It always got fail.
I don’t know what happend? vercel env or my dependencies abnormal?
error url: 
hello api 
“@vercel /node”: “2.10.3”,
             
            
               
               
               
            
            
           
          
            
              
                system  
                (system)
               
              
                  
                    July 16, 2025,  5:25am
                   
                   
              2 
               
             
            
              There’s another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.
  
  
    Sometimes things don’t go as expected when deploying a website. If you see a 404 on your site, that means the page or resource couldn’t be found. 
There are many possible causes, and the absence of something can be tricky debug if you don’t know where to look. Here are some things you can do to find the cause and fix it. 
 Debugging Tips
 Check the error code
If you see a mostly white screen with 404: NOT_FOUND along with a Code and and ID then you can click the blue info box below the error deta…
   
 
A human should be around soon to offer more advice. But you can also get helpful information quickly by asking v0 .
             
            
               
               
               
            
            
           
          
            
              
                amyegan  
                (Amy Egan)
               
              
                  
                    July 16, 2025,  1:22pm
                   
                   
              4 
               
             
            
              That vercel.json rewrite configuration is sending traffic from all paths, other than root, to www.whataicando.site/index.html which throws a 404. You’ll need to modify the rewrite to get this working
             
            
               
               
               
            
            
           
          
            
              
                system  
                (system)
                  Closed 
               
              
                  
                    July 23, 2025,  9:13pm
                   
                   
              5 
               
             
            
              This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.