I have two files: screenshot-1.png and audio.mp3. Locally everything works just fine. I upload both in the same route.
The filesystem on Vercel (source tab) shows that both files are there.
However, when attempting to access the file to check its existence:
if (!fs.existsSync(filePath)) { throw new Error(`File ${filePath} does not exist`); }this throws an error for the mp3 file, but does NOT for the png.
This is a NextJS app directory api route. File path is:
${process.cwd()}/public/assets/demo-guide/audio.mp3
and
${process.cwd()}/public/assets/demo-guide/screenshot-1.png
I am aware of the outputFileTracingIncludes and have configured it:
outputFileTracingIncludes: { '/api/test/create-demo': ['./public/assets/demo-guide/audio.mp3'], }but no cigar.
any help would be appreciated! NextJS 14