I am starting a project to import a CSV, transform it, and re-export back to a new CSV. Step one has been to get Node CSV up and running.
I have installed the node-csv-npm package to my Meteor app directory and confirmed in terminal that I am "already using" node-csv-npm.
Yet, for some reason, when I run the basic example to test my set-up (see code), I get back "Uncaught ReferenceError: csv is not defined"
Simple Coffee Code I am using:
if Meteor.isClient
console.log "client started."
csv().from.string("#Welcome\n\"1\",\"2\",\"3\",\"4\"\n\"a\",\"b\",\"c\",\"d\"", comment: "#").to.array (data) ->
console.log data
# [ [ '1', '2', '3', '4' ], [ 'a', 'b', 'c', 'd' ] ]
if Meteor.isServer
console.log "Server Started"
Thanks for any insight!
As requested in comments, posting entire app code (.coffee file)
if Meteor.isClient
console.log "Client Started"
if Meteor.isServer
console.log "Server Started"
csv().from.string("#Welcome\n\"1\",\"2\",\"3\",\"4\"\n\"a\",\"b\",\"c\",\"d\"", comment: "#").to.array (data) ->
console.log data
# [ [ '1', '2', '3', '4' ], [ 'a', 'b', 'c', 'd' ] ]