aacerox / node-rest-client

REST API client from node.js
MIT License
376 stars 132 forks source link

"node_modules\node-rest-client\lib\nrc-serializer-manager.js:122" #202

Closed MichaelXF closed 5 years ago

MichaelXF commented 5 years ago

Pasting the exact code into windows 10 nodejs

var Client = require('node-rest-client').Client;
var client = new Client();

gives the following error

C:\xampp\!www\bots\node_modules\node-rest-client\lib\nrc-serializer-manager.js:122
        "xmlSerializer":new xmlserializer.Builder(this.options),
                        ^

TypeError: xmlserializer.Builder is not a constructor
    at module.exports (C:\xampp\!www\bots\node_modules\node-rest-client\lib\nrc-serializer-manager.js:122:18)
    at new exports.Client (C:\xampp\!www\bots\node_modules\node-rest-client\lib\node-rest-client.js:13:61)
    at Object.<anonymous> (C:\xampp\!www\bots\fnbot.js:22:18)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)

this code I directly copied from the documentation. please fix.

MichaelXF commented 5 years ago

I isolated the problem and it seems to be relating to another library, pretty stupid thats the whole point of npm is to get things to work together waste of 20 mins of my life