node client_soap.js
node.js:249
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module './http'
at Function._resolveFilename (module.js:333:15)
at Function._load (module.js:280:25)
at Module.require (module.js:357:17)
at require (module.js:373:17)
at Object.<anonymous> (/home/a1/mysourc3e/client_soap.js:6:12)
at Module._compile (module.js:444:26)
at Object..js (module.js:462:10)
at Module.load (module.js:351:32)
at Function._load (module.js:309:12)
at module.js:482:10
npm list
/home/a1/mysourc3e
└─┬ soap@0.1.3
├── node-expat@1.5.0
└── request@2.2.6
I'm trying to run a sample code for node.js with soap. I can't get https://github.com/milewise/node-soap/blob/master/lib/client.js to work. Where do I get the module from?
Use require('http')
instead of require('./http')
.
The HTTP module is built in to node, so you shouldn't tell the loader to look for it in the current directory (as the "./
" prefix does).