Search code examples
javascriptmeteorcoffeescriptpapaparse

Meteor JS Error "ReferenceError: X is not defined"


I have installed a package using this command meteor add harrison:papa-parse. Then I used it in my script but an error message "ReferenceError: Papa is not defined". Do I need to do something else?

doStuff = (data) ->
  console.log data

parseData = (url, callBack) ->
  Papa.parse url,
    download: true
    dynamicTyping: true
    complete: (results) ->
      callBack results.data

Meteor.startup ->
  parseData "tests/sample.csv", doStuff
  return

Solution

  • harrison:papa-parse only adds Papa on the client, so you can't use it on the server.