Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Bad advice when locally-installed deps are out of date #52

Closed
tamzinblake opened this issue Jun 26, 2017 · 4 comments
Closed

Bad advice when locally-installed deps are out of date #52

tamzinblake opened this issue Jun 26, 2017 · 4 comments
Labels

Comments

@tamzinblake
Copy link

See sindresorhus/update-notifier#112

In this example, npx is using the locally-installed version of bower (node_modules/.bin/bower). update-notifier is correctly noticing that we're not using the latest version, but it suggests that npm i -g bower will fix that, which it will not, since it'll still use the locally-installed version, which is old.

For now, npx could probably fix this problem by setting isGlobal to the appropriate value in update-notifier?

https://github.com/yeoman/update-notifier#isglobal

@zkat
Copy link
Owner

zkat commented Jun 27, 2017

How can npx itself do anything about this, itself? The update-notifier calls that require isGlobal are for those libraries themselves, not for npx. I can set it in npx itself, but that wouldn't necessarily fix this since npx is very much meant to be a unique global install.

@zkat zkat added the question label Jun 27, 2017
@tamzinblake
Copy link
Author

If I'm not mistaken, on this line

npx/index.js

Line 71 in 612f7ab

require('update-notifier')({pkg: require('./package.json')}).notify()

We could pass the option isGlobal set to whether the package we're notifying about is global (if npx knows that at the time which I haven't determined)

@zkat
Copy link
Owner

zkat commented Jun 27, 2017

No, that line only applies to npx's own notifier. It won't affect the packages it's running. :/

@tamzinblake
Copy link
Author

:sadface:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants