Bunlong / react-papaparse

react-papaparse is the fastest in-browser CSV (or delimited text) parser for React. It is full of useful features such as CSVReader, CSVDownloader, readString, jsonToCSV, readRemoteFile, ... etc.
https://react-papaparse.js.org
MIT License
365 stars 61 forks source link

error when running "npm run build" #32

Closed mergingseas closed 4 years ago

mergingseas commented 4 years ago

when running npm run build I get the following error:

Creating an optimized production build... Failed to compile.

Failed to minify the code from this file:

./node_modules/react-papaparse/dist/react-papaparse.es.js:13:28612 

My setup is using create-react-app and node v8 and node v13 was tried

Bunlong commented 4 years ago

@mergingseas Could you please try to install react-papaparse v.3.4.0 which is the latest version? Thanks!

mergingseas commented 4 years ago

Hi Bunlong, I upgraded to the new version of v3.4 and I still get the same: Creating an optimized production build... Failed to compile.

Failed to minify the code from this file:

./node_modules/react-papaparse/dist/react-papaparse.es.js:13:28612 
Olovorr commented 4 years ago

I experience the same issue, did you figure out a workaround / fix for this? I am using the latest (3.7.0) version of paparse and react-scripts 3.4.1. @Bunlong @mergingseas

Bunlong commented 4 years ago

@Olovorr What are the create next app version, node version, and npm version in your local environment?

Olovorr commented 4 years ago

@Olovorr What are the create next app version, node version, and npm version in your local environment?

Not create next app, but create react app (CRA). The issue is that when building production build, it expects ES5 syntax and not higher. That being said I already created PR for this so unless you have a problem with my solution we probably don't need to dive deeper on this. As far as I know downgrading compiling target version should not cause any issues.

Bunlong commented 4 years ago

@Olovorr Yes, I got your PR. Okay let me test it and I will merge and deploy to production as soon as possible. Thanks you so much, I do appreciate for your help, could I add you to the contributor list?

Olovorr commented 4 years ago

@Olovorr Yes, I got your PR. Okay let me test it and I will merge and deploy to production as soon as possible. Thanks you so much, I do appreciate for your help, could I add you to the contributor list?

Sure mate! 🙂

Bunlong commented 4 years ago

@Olovorr react-papaparse v3.7.1 has been released! You were added to contributor list. Thanks!