Virtual-environments: Cached node on ubuntu not set up correctly

Created on 12 May 2020  路  3Comments  路  Source: actions/virtual-environments

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

  • [ ] macOS 10.15
  • [x] Ubuntu 16.04 LTS
  • [x] Ubuntu 18.04 LTS
  • [ ] Windows Server 2016 R2
  • [ ] Windows Server 2019

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

Java JavaScript and Node.js bug

Most helpful comment

All 3 comments

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tnze picture Tnze  路  4Comments

Poolitzer picture Poolitzer  路  4Comments

mcooley picture mcooley  路  3Comments

orj picture orj  路  4Comments

raulpopadineti picture raulpopadineti  路  3Comments