3

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?

Richard
  • 62,943
  • 126
  • 334
  • 542

1 Answers1

0

Have you tried using the baby parse project which has been forked from papa parse?

I've had good results with it so far with a project I'm working on.