-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Told me to update, but my version is already the latest one #67
Comments
A coworker experienced this today. I think using a consuming project multiple times and publishing an update to it in certain sequences (at a particular time of day) can cause this. |
I haven't been able to reproduce this, but if anyone submits a failing test, I would be happy to look into it. |
@jiripospisil, did you install |
This happens to me somewhat frequently. Could it be a timing issue with synchronicity? As in, updating to latest version while a version check is occurring based on the original version in package.json just prior to the update? Maybe there's some sense in suspending the notifier when an install/update is occurring? We've implemented this in our code, so this has definitely not just been in relation to npm but any update that occurs for one of our packages. |
@sindresorhus I'm getting a number of reports about this both on the npm issue tracker, and on twitter. |
Reproduce: all output ~ npm install -g npm-check-updates@2.11.1
/usr/local/bin/npm-check-updates -> /usr/local/lib/node_modules/npm-check-updates/bin/npm-check-updates
/usr/local/bin/ncu -> /usr/local/lib/node_modules/npm-check-updates/bin/ncu
+ npm-check-updates@2.11.1
added 2 packages, removed 30 packages and updated 7 packages in 15.162s
~ nano ~/.config/configstore/update-notifier-npm-check-updates.json # lower the lastUpdateCheck and save
~ ncu -g
⸨░░░░░░░░░░░░░░░░░░⸩ ⠴ :
aurelia-cli 0.30.0 → 0.30.1
npm-check-updates 2.11.1 → 2.12.1
~ npm install -g npm-check-updates
/usr/local/bin/npm-check-updates -> /usr/local/lib/node_modules/npm-check-updates/bin/npm-check-updates
/usr/local/bin/ncu -> /usr/local/lib/node_modules/npm-check-updates/bin/ncu
+ npm-check-updates@2.12.1
added 30 packages, removed 2 packages and updated 7 packages in 8.044s
~ ncu -g
╭──────────────────────────────────────────────╮
│ │
│ Update available 2.11.1 → 2.12.1 │
│ Run npm i -g npm-check-updates to update │
│ │
╰──────────────────────────────────────────────╯
⸨░░░░░░░░░░░░░░░░░░⸩ ⠴ : short version # install old npm-check-updates
npm install -g npm-check-updates@2.11.1
# reset the lastUpdate time
sed -i '' -E "s/([0-9]+)/0/" ~/.config/configstore/update-notifier-npm-check-updates.json
# make ncu check for updates once
ncu -g
# install latest
npm install -g npm-check-updates
# what's this now?
ncu -g Remember to edit the configfile and lower the lastUpdateCheck and save. |
I had the same issue here, a workaround that solved it is using the updateNotifier({
pkg,
callback: (data, update) => {
if (!update || pkg.version === update.latest) {
return;
}
console.log(chalk.cyan(
`There's an update of ${pkg.name} available:`,
chalk.dim(pkg.version), chalk.reset('→'), chalk.blue(update.latest),
chalk.dim('\nRun'), chalk.green(chalk.bold(`npm i -g ${pkg.name}`)), chalk.dim('to update.'),
));
},
}); |
I resolved this using:
|
A workaround for yeoman/update-notifier#67. To reproduce the issue, follow these steps: 1. Create an app with an old version of zapier-platform-core in package.json. 2. Run `zapier build` once. 3. Update zapier-platform-core version in package.json to the latest version. 4. Run `zapier build` again. The expected behavior is that the notification shouldn't show, but it did.
const updateNotifier = require('update-notifier')
const pkg = require('../package.json')
const notifier = updateNotifier({ pkg })
if (notifier.update && notifier.update.latest !== pkg.version) {
notifier.notify()
} |
@IssueHunt has funded $60.00 to this issue.
|
@sindresorhus has rewarded $54.00 to @fregante. See it on IssueHunt
|
More at: raineorshine/npm-check-updates/issues/190
IssueHunt Summary
fregante has been rewarded.
Backers (Total: $60.00)
Submitted pull Requests
Tips
IssueHunt has been backed by the following sponsors. Become a sponsor
The text was updated successfully, but these errors were encountered: