frictionlessdata / dpm-js

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

dpm install fails with proxy #44

Open aubergene opened 8 years ago

aubergene commented 8 years ago

dpm version 0.7.7, node 4.0.0

https_proxy=http://proxy.example.com:80 dpm install https://raw.githubusercontent.com/datasets/s-and-p-500-companies/master/datapackage.json
/usr/local/lib/node_modules/datapackage/lib/index.js:166
    if(err) return cb(err);
                   ^

ReferenceError: cb is not defined
    at Request._callback (/usr/local/lib/node_modules/datapackage/lib/index.js:166:20)
    at self.callback (/usr/local/lib/node_modules/datapackage/node_modules/request/request.js:123:22)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.self.clientErrorHandler (/usr/local/lib/node_modules/datapackage/node_modules/request/request.js:232:10)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at TLSSocket.socketErrorListener (_http_client.js:259:9)
    at emitOne (events.js:77:13)
    at TLSSocket.emit (events.js:169:7)
    at emitErrorNT (net.js:1250:8)
    at doNTCallback2 (node.js:429:9)
    at process._tickCallback (node.js:343:17)
pwalsh commented 8 years ago

@zhenyab can you please take a quick look at this.

zhenyab commented 8 years ago

@pwalsh I can't reproduce this bug. But looking into code it seems that it is typo on line 166: if(err) return cb(err); should be if(err) return callback(err);