Server API & CSV issue
Hey everyone,
I’m having an issue with exposing a CSV file through a server API endpoint. Here’s what I’m working with:
• CSV Location: data/products.csv
• API Endpoint: server/api/v1/products.get.ts
I’m using papaparse for parsing the CSV as follows:
This setup works perfectly on my local machine. However, when I deploy it to Vercel, I get the following error:
Any ideas on what might be causing this? I think I might have misconfigured something in the deployment settings.
Thanks in advance for any help!
1 Reply
Fixed.
Found infos on Vercel: https://vercel.com/guides/how-can-i-use-files-in-serverless-functions#using-nuxt
I used :
How to read files in Vercel Functions
Learn how to import, read, and store files inside Vercel Functions.