Next.js Discord

Discord Forum

CSV Files

Unanswered
Little Stint posted this in #help-forum
Open in Discord
Avatar
Little StintOP
Anyone know how to read a local CSV file in Next.js?

I am using Papaparser and I am trying to import/use my csv file but nothing works. I researched online and people said to edit th webpack and I tried that but getting errors:

Cannot find module '../_dataset/test.csv' or its corresponding type declarations.

3 Replies

Avatar
Schweizerischer Niederlaufhund
Can you show the file where you’re trying to access it?
Avatar
Little StintOP
Nvm got it working! Thanks for reaching out!
Avatar
Risky
was there anything specific you did to fix as it could be nice to others that come across this in future, but eitherwise very cool 🙂