Closed marguerrrite closed 2 years ago
I am able to reproduce this issue on multiple projects. I am resolving now.
@margueriteroth thank you for reporting this issue.
I have now resolved the issue with vue-papa-parse
version 3.1.0
I have tested this on your project as well.
I also have a couple of recommendations:
First for your .csv files. I would move those static assets to the public folder by moving the data folder from src
to public
and then update the path to all referenced URLs.
That way when changing: localDataUrl: "src/data/noaa-data.csv",
to localDataUrl: "data/noaa-data.csv",
will always resolve when running in both dev and prod.
Love your project, keep up the hard work and keep fighting the good fight!
PS Sorry this project caused you a snag.
-TW
@twickstrom
Thank you so much! Works like a charm — https://vue-d3-dataviz-starter.netlify.app/
(And moved /data/
to the public
folder. Time to fully embrace the public
folder 😊.)
Overview I am putting together a site utilizing Vue 3, Vite, and reading a local CSV with vue-papa-parse:
The site reads and loads CSV data when running locally.
After running
npm build
and viewing the built site, the console is throwing thisthis.$papa.parse is not a function
error. I am able to log the function itself but it is only showing mededupe
anddownload
. I'm wondering if I am missing a dependency somewhere.Chart component utilizing
this.$papa.parse
: MassShootingPlot.vueRegistration of library main.js.
To Reproduce Steps to reproduce the behavior:
npm run dev
, navigate to http://localhost:3000/ to view chartsnpm run build
npm run preview
, navigate to http://localhost:8888/Expected behavior
this.$papa.parse...
to load CSV data successfully, like on localhost:I'm not sure why the
.parse
function is missing.Desktop (please complete the following information):