yeoman / update-notifier

Update notifications for your CLI app
BSD 2-Clause "Simplified" License
1.76k stars 132 forks source link

Setting up for Angular project #208

Closed shaklin-box8 closed 3 years ago

shaklin-box8 commented 3 years ago

Hi,

I just came across this package and found interesting and hence wanted to add it to our package(was unclear how to) and created a file named updateNotifier.js and pasted the sample code

const updateNotifier = require('update-notifier');
const pkg = require('./package.json');

// Checks for available update and returns an instance
const notifier = updateNotifier({pkg, updateCheckInterval: 0});

// Notify using the built-in convenience method
notifier.notify();

// `notifier.update` contains some useful info about the update
console.log(notifier.update);

while i try to run with node updateNotifier.js all i get is undefined

Any help would be great.

sindresorhus commented 3 years ago

Support questions are better asked on Stack Overflow.