Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm warns about new version while installing new npm version #21186

Open
1 of 5 tasks
lilyball opened this issue Jul 10, 2018 · 5 comments
Open
1 of 5 tasks

npm warns about new version while installing new npm version #21186

lilyball opened this issue Jul 10, 2018 · 5 comments

Comments

@lilyball
Copy link

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • npm is producing incorrect or undesirable behavior.
  • Other (see below for feature requests):

What's going wrong?

npm warned me that there was a new minor version available (6.0.1 → 6.1.0), so I installed it, and after installing it, npm warned me that there was a new minor version available.

I realize it's doing this because the version of npm that's running is the old version, but it sure would be nice if it was smart enough to realize I was installing the new version and therefore it should suppress the new version warning.

How can the CLI team reproduce the problem?

Have npm 6.0.1 installed and run npm install -g npm.

supporting information:

  • npm -v prints: 6.0.1
  • node -v prints: v8.11.3
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: macOS
@DanielRuf
Copy link

Restart your terminal or reload your environment with source ~/.bashrc if you use bash as shell.

@lilyball
Copy link
Author

What does that have to do with anything?

@DanielRuf
Copy link

What does that have to do with anything?

Normally after an upgrade of npm (which should have worked) you may have to restart the terminal session to see the new info.

Did you try the upgrade with npm i -g npm@latest multiple times?

@lilyball
Copy link
Author

Why would I have to restart my terminal at all? I'm not using nvm or anything like that. I'm just using a vanilla global install of npm.

This is a red herring anyway, because it doesn't even matter what happens after the upgrade is complete. I'm not complaining that the new version isn't available. I'm complaining that npm itself is warning me that there's a new version, like it does, except it's doing so in response to me telling it to install the new version.

@lilyball
Copy link
Author

I'd paste the output I'm talking about but I'm not sure how to reproduce it. I just downgraded my npm install and then used it to install another package and it's not giving me the "new minor version available" warning, so I don't know what triggers that.

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

No branches or pull requests

2 participants