frictionlessdata / dpm-js

[DEPRECATED] Please use https://datahub.io/docs/features/data-cli
109 stars 18 forks source link

Running "dpm init" on directory with a csv file errors out #38

Closed bnvk closed 8 years ago

bnvk commented 8 years ago

Not sure what is going on here. See stack trace:

/Users/honeybadger/.nvm/versions/node/v0.12.5/lib/node_modules/datapm/node_modules/datapackage/datapackage.js:287
  var parser = csv();
               ^
TypeError: object is not a function
    at Object.exports.createJsonTableSchema (/Users/honeybadger/.nvm/versions/node/v0.12.5/lib/node_modules/datapm/node_modules/datapackage/datapackage.js:287:16)
    at Object.exports.createResourceEntry (/Users/honeybadger/.nvm/versions/node/v0.12.5/lib/node_modules/datapm/lib/util.js:45:17)
    at /Users/honeybadger/.nvm/versions/node/v0.12.5/lib/node_modules/datapm/lib/util.js:70:13
    at Array.forEach (native)
    at Object.exports.createResourceEntries (/Users/honeybadger/.nvm/versions/node/v0.12.5/lib/node_modules/datapm/lib/util.js:69:13)
    at DPM.init (/Users/honeybadger/.nvm/versions/node/v0.12.5/lib/node_modules/datapm/lib/dpm.js:61:8)
    at DPM.run (/Users/honeybadger/.nvm/versions/node/v0.12.5/lib/node_modules/datapm/lib/dpm.js:28:10)
    at Object.<anonymous> (/Users/honeybadger/.nvm/versions/node/v0.12.5/lib/node_modules/datapm/bin/dpm.js:27:7)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

I made sure I had "csv" module installed globally, and yep, still errored out!

mchelen commented 8 years ago

Hmm I wasn't able to reproduce this error.

rufuspollock commented 8 years ago

@bnvk this may be related to your old version of dpm?

bnvk commented 8 years ago

Ah, sorry closing this. I was using either a really old version of dpm or the wrong one altogether. Thanks!