ci: run lerna via npx in the nightly ci and e2e steps - #1261
Merged
Conversation
The Unit & Integration Tests step invoked bare 'lerna run ci', which on the hosted windows-latest image resolves the globally preinstalled lerna at C:\npm\prefix\node_modules\lerna instead of the repo's lerna 9.0.7. That global copy crashes on Node 18 with 'TypeError: Cannot read properties of undefined (reading startsWith)' in import-local, so no tests ran and the job failed (build 161589). The Build step already used 'npx lerna run build' and passed; the Node 18 / lerna 9 migration missed the ci and e2e invocations. Switch both to npx so the repo-local lerna is always used. Linux is green only because that image's global lerna happens to match, so apply the same change there.
Copilot started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
August 10, 2026 20:16
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes nightly CI failures caused by invoking a globally preinstalled lerna on hosted agents (notably windows-latest), by ensuring the pipelines always execute the repo-local Lerna via npx.
Changes:
- Update Windows nightly pipeline to run
ciande2eviacall npx lerna ...to avoid the global Lerna on hosted agents. - Update Linux nightly pipeline to run
ciande2evianpx lerna ...for consistent behavior across images.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| vsts/node-nightly-windows.yaml | Switches ci/e2e steps to call npx lerna ... to force the repo-local Lerna on Windows agents. |
| vsts/node-nightly-linux.yaml | Switches ci/e2e steps to npx lerna ... to avoid latent reliance on a globally installed Lerna. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Raul Leclair (RLeclair)
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What failed
Nightly
node-eastus-windowsbuild 161589 failed in stagebuild_and_tests, jobWindows Node 18.x, step Unit & Integration Tests (Cmd.exe exited with code '1'). No tests ran at all;E2E Testsand everything downstream were skipped.Root cause
The step invoked bare
call lerna run ci. On the hostedwindows-latestimage that resolves the globally preinstalled lerna atC:\npm\prefix\node_modules\lernarather than the repo'slerna@9.0.7, and that global copy crashes under Node 18.The preceding Build step in the same job passed, because it already uses
npx lerna run build:The Node 18 / lerna 9 migration converted the
buildinvocation tonpxbut missedciande2e.Fix
Use
npxfor theciande2esteps so the repo-local lerna is always the one that runs.vsts/node-nightly-windows.yaml-call lerna run ci->call npx lerna run ci,lerna run e2e->call npx lerna run e2e. The e2e step would have failed identically as soon asciwas unblocked.vsts/node-nightly-linux.yaml- same two changes. Linux is green today only because that image's global lerna happens to be 9.0.7, so the same latent breakage is present there and invisible.Verified locally that
npx lerna --versionresolves to9.0.7from the root devDependency.Out of scope
vsts/node-nightly-df.yamlandvsts/e2e-debug-loop.yamlcontain the same bare-lernapattern (ande2e-debug-loop.yamlstill callslerna bootstrap --hoist, removed in lerna 9), but those pipelines need broader work to bring back to life and are intentionally left alone here.