thallium205 / xero

Xero Library for Private Applications in Node
48 stars 55 forks source link

There is no configure method in easyxml #8

Closed eroh92 closed 9 years ago

eroh92 commented 9 years ago
> Xero = require('xero')                                                                                                                                           
[Function: Xero]                                                                                                                                                   
> xero = new Xero(conf.consumerKey, conf.consumerSecret, key)                                                                                                      
TypeError: Object function (config) {                                                                                                                              
    this.config = EasyXml.merge({                                                                                                                                  
        singularizeChildren: true,                                                                                                                                 
        allowAttributes: true,                                                                                                                                     
        attributePrefix: '_',                                                                                                                                      
        rootElement: 'response',                                                                                                                                   
        rootArray: 'items',                                                                                                                                        
        dateFormat: 'ISO', // ISO = ISO8601, SQL = MySQL Timestamp, JS = (new Date).toString()                                                                     
        manifest: false,                                                                                                                                           
        unwrappedArrays: false,                                                                                                                                    
        indent: 4,                                                                                                                                                 
        filterNulls: false                                                                                                                                         
    }, config);                                                                                                                                                    
} has no method 'configure'                                                                                                                                        
    at new Xero (/home/action/workspace/atomic-xero/node_modules/xero/index.js:14:13)                                                                              
    at repl:1:9                                                                                                                                                    
    at REPLServer.self.eval (repl.js:110:21)                                                                                                                       
    at Interface.<anonymous> (repl.js:239:12)                                                                                                                      
    at Interface.EventEmitter.emit (events.js:95:17)                                                                                                               
    at Interface._onLine (readline.js:202:10)                                                                                                                      
    at Interface._line (readline.js:531:8)                                                                                                                         
    at Interface._ttyWrite (readline.js:760:14)                                                                                                                    
    at ReadStream.onkeypress (readline.js:99:10)                                                                                                                   
    at ReadStream.EventEmitter.emit (events.js:98:17)      
cyberwombat commented 9 years ago

The npm version is outdated I think and the package.json doesn't specify an easyxml version so it defaults to a newer version. Pulling from github works as it locks the easyxml version to the one that has the configure method. Though I suppose things need an update...

thallium205 commented 9 years ago

I updated the npm version to what is in github a few weeks ago - it should be current.

cyberwombat commented 9 years ago

Indeed. I think it kept installing a cached version for me.