I need to show updates for a public npm package, Rapid React. Unfortunately update-notifier doesn’t seem to work. I debugged the notify() function by adding logs and found out the following.
Debugging:
console.log(!process.stdout.isTTY, suppressForNpm, !this.update); // false true true
// the if statement turns out to be true and code execution returns from here
if (!process.stdout.isTTY || suppressForNpm || !this.update || !semver().gt(this.update.latest, this.update.current)) {
return this;
}
System Information
Issue:
I need to show updates for a public npm package, Rapid React. Unfortunately
update-notifier
doesn’t seem to work. I debugged thenotify()
function by adding logs and found out the following.Debugging:
Code: