-
Notifications
You must be signed in to change notification settings - Fork 72
[QUESTION] How do I update a package in the cache? #93
Comments
It should automatically use the new version, unless it’s installed locally or globally. |
Do consider the first run of Can you please clarify what’s going on? |
No, only npm install -g is a global install. what version of npm/npx are you having this problem with? Are you using the npx that came with npm, or did you update it separately? |
$ npx --version
7.4.0
$ node --version
v15.2.0
$ npm --version
7.4.0 I update npm when it asks me, but I never updated npx by itself. UPDATE: I’m running |
No dice: $ node --version
v15.5.1
$ npm --version
7.4.0
$ npx --version
7.4.0
$ npx obs-cli --version
2.0.0 I released a dummy 2.0.1 version of obs-cli to test this out. It isn’t picked up by npx… |
When I run |
Oops, I missed your answer here, sorry. $ which obs-cli
obs-cli not found
$ npm ls -g
/usr/local/lib
└── npm@7.4.0 That makes sense, since the point of using I’m confident $ find ~/.npm | grep obs-cli
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/.bin/obs-cli
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/obs-cli
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/obs-cli/CODE_OF_CONDUCT.md
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/obs-cli/LICENSE
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/obs-cli/index.js
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/obs-cli/README.md
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/obs-cli/package.json
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/obs-cli/.github
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/obs-cli/.github/workflows
/Users/leafac/.npm/_npx/58ae1233f0a6b735/node_modules/obs-cli/.github/workflows/main.yml |
@ljharb: Judging by the 👍 on my previous comment it seems like you agree that |
I don’t. It seems like it might be a bug, though. I’d suggest trying npx on npm 7 latest, and then if it’s still not working, file a bug on the cli repo (since that’s where npm 7’s npx lives). |
Okay. Thank you for your help. I’m closing this in favor of npm/cli#2329 |
What / Why
If I don’t have obs-cli installed and run
npx obs-cli --version
, then npx installs obs-cli. When a new version of obs-cli is released, how do I update it on my machine such thatnpx obs-cli --version
shows me latest version?So far my workaround has been to
rm -rf ~/.npm
. I’m sure there must be a less heavy-handed way of doing this, but I couldn’t find anything online.Where
Who
@isaacs (I assume, because of his activity here)
References
The text was updated successfully, but these errors were encountered: