File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed 
test/e2e/app-dir/proxy-missing-export Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11import  {  nextTestSetup  }  from  'e2e-utils' 
22
3- const  errorMessage  = 
4-   'The Proxy "/proxy" must export a `proxy` or a `default` function' 
3+ const  errorMessage  =  `The file proxy must export a function, either as a default export or as a named proxy export. 
4+ This function is what Next.js runs for every request handled by this proxy (previously called middleware). 
5+ 
6+ Why this happens: 
7+ - The file exists but doesn't export a function. 
8+ - The export is not a function (e.g., an object or constant). 
9+ - There's a syntax error preventing the export from being recognized. 
10+ 
11+ To fix it: 
12+ - Check your "proxy" file. 
13+ - Ensure it has either a default or "proxy" function export. 
14+ - Restart the dev server if the error persists.` 
515
616describe ( 'proxy-missing-export' ,  ( )  =>  { 
717  const  {  next,  isNextDev,  skipped }  =  nextTestSetup ( { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments