meteor-node-csv icon indicating copy to clipboard operation
meteor-node-csv copied to clipboard

Meteor 0.7 Breaks Node-CSV?

Open ppedrazzi opened this issue 10 years ago • 8 comments

I could be wrong, but I can't get this to work with the latest version of meteor. I created an issue on Stack Overflow here: http://stackoverflow.com/questions/22120619/node-csv-npm-install-causes-meteor-to-hang-at-starting-your-app

If I'm wrong, feel free to delete.

ppedrazzi avatar Mar 02 '14 01:03 ppedrazzi

Seems to be working for me, I created a fresh app with meteor create then added this package with mrt add node-csv-npm and then started up the application with meteor and it didn't hang. Although I didn't try actually using the package in the app, does your app start if you comment out the code that uses node-csv-npm?

Dsyko avatar Mar 02 '14 02:03 Dsyko

I just tried your suggestion of commenting out the code using CSV. The app now starts fine.

Mind giving it a try on your side?

On Mar 1, 2014, at 6:56 PM, Dsyko [email protected] wrote:

Seems to be working for me, I created a fresh app with meteor create then added this package with mrt add node-csv-npm and then started up the application with meteor and it didn't hang. Although I didn't try actually using the package in the app, does your app start if you comment out the code that uses node-csv-npm?

— Reply to this email directly or view it on GitHub.

ppedrazzi avatar Mar 04 '14 16:03 ppedrazzi

Thought I'd include my code, running on the server.

Meteor.methods
    Convert CSV to Array
    csv2Array: cvs2Array = (fileUrl, callback) ->
        arr = Async.runSync((done) ->
          console.log done
          CSV().from(fileUrl,
            comment: "#"
          ).to.array (data) ->
            console.log "data following"
            console.log data[0]
            done null, data
        )
        arr.result

    #Convert Array to CSV
    array2Csv: array2Csv = (array, callback) ->
        arr = Async.runSync((done) ->
          console.log done
          CSV().from.array(array).to.string (data) ->
            console.log "Re-Converted array: #{data}."
            done null, data
        )
        arr.result

ppedrazzi avatar Mar 05 '14 15:03 ppedrazzi

This is not a problem with node-csv, rather with Meteor itself. I've got the same issue right now, with a different package that was working great an hour ago.

subhog avatar Mar 15 '14 06:03 subhog

Good to know I’m not crazy!

Did you notify the core devs? If not, I can pass this along.

Have a great weekend!

On Mar 14, 2014, at 11:11 PM, subhog [email protected] wrote:

This is not a problem with node-csv, rather with Meteor itself. I've got the same issue right now, with a different package that was working great an hour ago.

— Reply to this email directly or view it on GitHub.

ppedrazzi avatar Mar 15 '14 14:03 ppedrazzi

Hey guys, sorry for my lack of response on this. I'd suggest moving to the npm package to include npm packages rather than individual package wrappers like this one :). I've experienced a few breaking changes that came through with Meteor 0.7.x so I wouldn't be surprised if some of the NPM stuff has changed.

Dsyko avatar Mar 15 '14 19:03 Dsyko

@ppedrazzi, I'm posting an issue right now. Please pass it along as well if you've got better means.

subhog avatar Mar 21 '14 10:03 subhog

Will do!!

On Mar 21, 2014, at 3:18 AM, subhog [email protected] wrote:

@ppedrazzi, I'm posting an issue right now. Please pass it along as well if you've got better means.

— Reply to this email directly or view it on GitHub.

ppedrazzi avatar Mar 21 '14 14:03 ppedrazzi