wbyoung / avn

Automatic Version Switching for Node
MIT License
1.14k stars 54 forks source link

npm version not restoring #59

Closed alextrastero closed 7 years ago

alextrastero commented 7 years ago

When switching from projects with different node-versions avn switches fine but my npm version doesn't switch, what am I doing wrong?

screen shot 2017-09-13 at 12 26 35
ljharb commented 7 years ago

It looks like it's switching fine in your image?

alextrastero commented 7 years ago

yes, node version switching fine, but npm version not persisting, I eventually switch from n to nvm and that solved it

wbyoung commented 7 years ago

It's also possible that you updated npm for that install of node.

ljharb commented 7 years ago

Right - npm comes with node, so every time you switch node versions, you're switching npm versions too. It's not supposed to persist.

alextrastero commented 7 years ago

Yes, but when you switch back to the previous project shouldn't it restore to the npm version installed with THAT node version? (like the screenshot shows) :)

ljharb commented 7 years ago

Ah, your screenshot wasn't clear - are you saying the node version (for which npm was v5.4.1) was 6.11.0?

wbyoung commented 7 years ago

I believe that n would have the upgrade of npm persist, but I haven't confirmed that.