#Error no such file or directory.
1 messages · Page 1 of 1 (latest)
How are you reading the file? How is it being deployed? Are you certain the file exists in production?
const data = await readFile(join(process.cwd(),'./src/fba/data/amazonFees/referralFee.json'), 'utf8');
It is being deployed in vercel
Do you deploy the source code to vercel? Can you verify that that file does indeed exist?
Don't care about development. We're talking about where the issue is: production
How to verify that?
Dunno, I don't use vercel. Normally I'd suggest ssh-ing into your production server and checking the files that exist. No clue if vercel gives you that ability though
What do you use for deployment?
For any of them, look up Typescript NodeJS deployed to <provider>. It's pretty much the same as those
Easier than?
I tried in railway too
ENOENT: no such file or directory, open '/app/src/fba/data/amazonFees/fixedClosingFee.json'
Error: ENOENT: no such file or directory, open '/app/src/fba/data/amazonFees/fixedClosingFee.json'
Same error
I'll say it again: that means the file doesn't exist
Is there any way to find the correct path in production?
That would all depend on the deployment process. I don't know what you're deploying, or how vercel or railway work under the hood, so I can't say