Are you using the updated version of node library, our latest version is 1.1.0 . Try running npm update in your project root. If it still doesn't work please provide some code snippet, so that we can guide you the right path.
@rupesh93 The redirect_uri is the address of your server where you want to receive the code and access token. It could be a local server running on your system.
When calling var loginUrl = upstox.getLoginUri(your-redirect-uri); it has to be the same redirect_uri specified in the app details in Developer Console.
To generate code, go to the loginUrl returned by the getLoginUri(your-redirect-uri); method. This opens up a login page and upon successful login, the code will be POSTed as a parameter to your redirect_uri.
Use this code in your parameters to generate the access token.