Describe the bug
I think this commit introduced a bug and isn't setting up node modules correctly.
Area for Triage: JavaScript and Node.js
Question, Bug, or Feature?: Bug
Virtual environments affected
Expected behavior
We should be able to install a different version of npm after installing node.
Actual behavior
Trying to do this results in an error: Error: Cannot find module 'semver'
You can see this behaving correctly on a downloaded version of node and incorrectly on the cached version. In this example, I use Node 8.16.2 since that's the highest version that isn't the cached version (8.17.0) - https://dev.azure.com/vstscix/damccormTest/_build/results?buildId=115122&view=logs&j=4021d9ab-6287-5638-9fd6-4c6c049820ed&t=b5b3e3e4-1b78-582b-1ea4-c44df544cec9. Uses the following yaml:
trigger:
- master
jobs:
- job: cachedNode
pool:
vmImage: 'ubuntu-16.04'
steps:
# Use node 8, npm 5
- task: NodeTool@0
displayName: Use node 8
inputs:
versionSpec: "8.x"
- script: npm i -g [email protected] --force
displayName: Use npm version 6.9.0
- job: downloadedNode
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: NodeTool@0
displayName: Use node 8
inputs:
versionSpec: "8.16.2"
- script: npm i -g [email protected] --force
displayName: Use npm version 6.9.0
cc the following people who created or reviewed the pr: @dmitry-shibanov @sergey-akhalkov @AlenaSviridenko @maxim-lobanov
Hello @damccorm , Thank you for the report.
We are aware about this issue and it affects only Ring 0 currently.
We have done fix on Provisioner side and it should be deployed to Ring 0 today later
@damccorm should be fixed now. Could you check, please?
Looks like its working now, thanks for the quick turnaround!
Successfully build - https://dev.azure.com/vstscix/damccormTest/_build/results?buildId=115149&view=logs&j=09020321-c96b-5abf-ada0-57823a408a7d&t=09020321-c96b-5abf-ada0-57823a408a7d
Most helpful comment
Looks like its working now, thanks for the quick turnaround!
Successfully build - https://dev.azure.com/vstscix/damccormTest/_build/results?buildId=115149&view=logs&j=09020321-c96b-5abf-ada0-57823a408a7d&t=09020321-c96b-5abf-ada0-57823a408a7d