install-node.sh installs incompatible npm@latest (npm 12) on Node 20

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Critical - P2
    • None
    • Component/s: Evergreen Tools
    • None
    • Not Needed

      Summary

      Setting up a local MongoDB server through DET fails when the environment uses Node 20. During setup, DET upgrades npm to the "latest" version, but the newly released npm 12 no longer supports Node 20.

      Release notes: https://github.com/npm/cli/releases/tag/v12.0.0

      Repro:

      docker run --rm node:20.20.2 npm install --global npm@latest
      

      output:

      npm error code EBADENGINE
      npm error engine Unsupported engine
      npm error engine Not compatible with your version of node/npm: npm@12.0.0
      npm error notsup Not compatible with your version of node/npm: npm@12.0.0
      npm error notsup Required: {"node":"^22.22.2 || ^24.15.0 || >=26.0.0"}
      npm error notsup Actual:   {"npm":"10.8.2","node":"v20.20.2"}
      npm error A complete log of this run can be found in: /root/.npm/_logs/2026-07-08T21_41_26_306Z-debug-0.log
      

      Acceptance Criteria

      Pin the npm version per Node release so setup never uses an incompatible "latest" release.

            Assignee:
            Preston Vasquez
            Reporter:
            Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: