I'm trying to use PapaParse with browserify and npm.
I have installed the package with npm i --save papaparse
and it is in the node_modules
folder.
This is my index.js
file:
var Papa = require('papaparse');
getData: function() {
Papa.parse(_this.globalOptions.numeratorUrl, {
download: true,
header: true,
error: function(err, file, inputElem, reason) {
...
},
complete: function(numeratorData) {
...
}
});
}),
But with this I get Uncaught TypeError: Papa.parse is not a function
.
What am I doing wrong? Or at least, how can I debug this?