bqst
bqst
NNuxt
Created by bqst on 10/23/2024 in #❓・help
SelectMenu Focus on iOS/Safari
Hello 👋, with iOS/Safari, when using searchable SelectMenu, touching the element does not automatically focus Safari on it like it does with other fields (Input, Select, etc.). The effect is that when you touch the SelectMenu, if it’s located at the bottom of the page, the keyboard comes up and hides the input field. (see the attached video) Do you know why this happens and how to fix it? Thanks!
4 replies
NNuxt
Created by bqst on 6/6/2024 in #❓・help
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:
const filePath = path.resolve('data/products.csv');
const fileContent = fs.readFileSync(filePath, 'utf8');
const products = Papa.parse(fileContent, { header: true }).data;
...
const filePath = path.resolve('data/products.csv');
const fileContent = fs.readFileSync(filePath, 'utf8');
const products = Papa.parse(fileContent, { header: true }).data;
...
This setup works perfectly on my local machine. However, when I deploy it to Vercel, I get the following error:
ENOENT: no such file or directory, open '/var/task/data/products.csv'
ENOENT: no such file or directory, open '/var/task/data/products.csv'
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!
2 replies