Note: My application runs under npm run dev environment but for some reason,
and I can access the application on local host just fine with full functionality.
However I have to remove ALL my configs from the vercel.json file and use just {} as it’s content for vercel dev to run fine locally, but of course when I use vercel --prod, the deployment succeeds but
I get
‘404: NOT_FOUND
Code: NOT_FOUND
ID: iad1::g89m9-1725064247258-b9dc58c77523’
After a two days trying to cover all possibilities (read below), I consistently get
Vercel CLI 37.1.1
? Set up and develop “D:\OASMvrcl”? yes
? Which scope should contain your project? RameshRamloll’s projects
? Link to existing project? yes
? What’s the name of your existing project? oas-mvrcl
Linked to rameshramlolls-projects/oas-mvrcl (created .vercel)
Error: The pattern “pages/api/openai-proxy.js” defined in functions
doesn’t match any Serverless Functions inside the api
directory.
What I’ve Tried
I have thoroughly reviewed the file paths and ensured that they are consistent and correct. Specifically, I verified that the file openai-proxy.js
is located in pages/api/
and that it is referenced correctly in the vercel.json
file. Despite this, the error persists.
Here’s a summary of the troubleshooting steps I’ve already taken, multiple times, without success:
- Cleared Vercel cache: Both locally (by removing the
.vercel
folder) and in the Vercel dashboard. - Reinstalled all dependencies: Deleted
node_modules
andpackage-lock.json
, then reinstalled everything. - Reviewed and retyped file paths: Ensured there are no invisible characters or case sensitivity issues.
- Linked to the existing project: Confirmed that the project is correctly linked during the setup process.
Request for Assistance
Despite these efforts, I continue to face the same error, and it has become a major blocker for my project development. I would be extremely grateful if you could provide any insights or solutions to resolve this issue.
I’m also open to providing any additional details or logs if needed. Thank you in advance for your support.