Skip to content
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

How to change npm version #1097

Closed
rosieks opened this issue Jan 20, 2016 · 2 comments
Closed

How to change npm version #1097

rosieks opened this issue Jan 20, 2016 · 2 comments

Comments

@rosieks
Copy link

rosieks commented Jan 20, 2016

I'm trying to update npm on my build machine. I have installed new version by running npm install [email protected] -g but when I look into capabilities it still points to C:\Program Files (x86)\nodejs\npm.cmd.

Could you provide some instruction how to change that value? Overriding it via user capabilities doesn't work.

@bryanmacfarlane
Copy link
Contributor

actually an npm question - but ...

capabilities don't matter (just that it has a value). What's important is it's in the path.

run: where npm

then run npm -v

On one of my machines the installer just did the right thing (cmd in pf pointed to 3.0). On another it still pointed to 2.0 and I fixed it or removed it (where returned a list).

The other thing to be aware of is it has to be in the path of the account your build agent is running as. (could run as your identity if it works for you).

We're working toward a better solution here on our side to avoid needing as a pre-req: https://github.com/Microsoft/vso-agent-tasks/blob/master/docs/tools.md

@rosieks
Copy link
Author

rosieks commented Jan 20, 2016

Thank's - I didn't know that build process is looking for tools by PATH.

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

No branches or pull requests

2 participants