Solved! Go to Solution.
npm install request-replay
This has fixed the reference issue for request-replay module.
But now I am facing new issue,
*** Starting script *** Script ReqRep.js exited with status code 0
My ReqRes.js script goes as below.This is the same program given in the link https://github.com/IndigoUnited/node-request-replay/blob/master/README.md.Even the Node.js logs does not present any other useful information to fix the issue.Could not find any relevant links in community posts for similar issue.Could you please let me know what could be the issue?
var fs = require('fs'); var request = require('request'); var replay = require('request-replay'); // Note that the options argument is optional // Accepts the same options the retry module does and an additional // errorCodes array that default to ['EADDRINFO', 'ETIMEDOUT', 'ECONNRESET', 'ESOCKETTIMEDOUT'] replay(request('http://google.com/doodle.png', function (err, response, body) { // Do things }), { retries: 10, factor: 3 }) .on('replay', function (replay) { // "replay" is an object that contains some useful information console.log('request failed: ' + replay.error.code + ' ' + replay.error.message); console.log('replay nr: #' + replay.number); console.log('will retry in: ' + replay.delay + 'ms') })
Dear @RadhamaniRamadoss ,
Glad this issue is resolved. To make sure not to loose the context, please post different question. Also, Accept the answer so that it will be helpful for others looking for same.
Cheers,
Anil Sagar
Sure...Will do.Thanks