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

Add npm capability to NodeTool #9796

Merged
merged 1 commit into from
Mar 12, 2019
Merged

Conversation

sunahe
Copy link
Contributor

@sunahe sunahe commented Mar 11, 2019

Resolves #9795

@sunahe sunahe requested a review from hross as a code owner March 11, 2019 19:53
@msftclas
Copy link

msftclas commented Mar 11, 2019

CLA assistant check
All CLA requirements met.

@damccorm
Copy link

I agree this is an issue that should be addressed, I think the solution is a little more complicated than this though. At the moment I don't think we actually acquire Npm as part of this task, so we can't just mark it as being satisfied

@sunahe
Copy link
Contributor Author

sunahe commented Mar 11, 2019

Doesn't it? At least all the redistributable packages on https://nodejs.org/dist/v10.15.3/ seem to contain both node and npm executables. I tried using the updated task (on a Windows build agent), and there npm was successfully found and used. Here are the relevant build logs from npm tasks in that build:

2019-03-11T21:02:22.7270898Z [command]C:\windows\system32\cmd.exe /D /S /C "D:\B\A1\_work\_tool\node\10.15.3\x64\npm.cmd --version"
2019-03-11T21:02:26.0551038Z 6.4.1
2019-03-11T21:02:29.4926304Z [command]C:\windows\system32\cmd.exe /D /S /C "D:\B\A1\_work\_tool\node\10.15.3\x64\npm.cmd config list"
2019-03-11T21:02:30.6830756Z ; cli configs
2019-03-11T21:02:30.6831541Z metrics-registry = "https://registry.npmjs.org/"
2019-03-11T21:02:30.6831879Z scope = ""
2019-03-11T21:02:30.6832363Z user-agent = "npm/6.4.1 node/v10.15.3 win32 x64"
2019-03-11T21:02:30.6832687Z 
2019-03-11T21:02:30.6833153Z ; environment configs
2019-03-11T21:02:30.6833666Z userconfig = "D:\\B\\A1\\_work\\260\\npm\\161912.npmrc"
2019-03-11T21:02:30.6833995Z 
2019-03-11T21:02:30.6834488Z ; node bin location = D:\B\A1\_work\_tool\node\10.15.3\x64\node.exe
2019-03-11T21:02:30.6835054Z ; cwd = D:\B\A1\_work\260\s\frontend
2019-03-11T21:02:30.6836414Z ; HOME = C:\Users\TFSBUILD
2019-03-11T21:02:30.6836959Z ; "npm config ls -l" to show all defaults.
2019-03-11T21:02:30.6837302Z 
2019-03-11T21:02:30.6840230Z [command]C:\windows\system32\cmd.exe /D /S /C "D:\B\A1\_work\_tool\node\10.15.3\x64\npm.cmd run build"

@damccorm
Copy link

Interesting. I first noticed this behavior on older versions of node on windows, I think its actually only true for them because Node doesn't package npm with them in older releases. You can see we have a fallback to the older format for windows node in our code, I think just those don't get npm installed. That's still an issue, but less concerning.

@damccorm damccorm merged commit 8535dcd into microsoft:master Mar 12, 2019
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

Successfully merging this pull request may close these issues.

3 participants