[Regression]: "playwright.ps1 install" crashes in branches with older version when newer version was installed in another branch

Aperta
#2,959 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@dgozman ci sta già lavorando.

Dal 5/11/2026.

  • #3415 di @dgozman — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp, node.js, powershell
Ambito
testing-qa

Direzione di ricerca

Riproduci il problema con branch che fanno riferimento a Microsoft.Playwright.NUnit 1.44.0 e 1.45.0, usando playwright.ps1 install e l’ambiente Windows/.NET indicato. Inizia tracciando il modo in cui lo script seleziona la propria versione e gestisce l’errore del modulo Node dopo il cambio di branch. Il lavoro è completato quando playwright.ps1 install e i test funzionano di nuovo su entrambi i branch senza richiedere una pulizia della soluzione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

P3-collecting-feedback
Last Good Version

1.44.0

First Bad Version

1.45.0

Steps to reproduce
  1. Create branch "A" where code references Microsoft.Playwright.NUnit 1.44.0

  2. Run "playwright.ps1 install" - works as expected

  3. Run tests - works as expected

  4. Create branch "B" where code references Microsoft.Playwright.NUnit 1.45.0

  5. Run "playwright.ps1 install" - works as expected

  6. Run tests - works as expected

  7. Change back to branch "A"

  8. Run "playwright.ps1 install" - fails with error below

  9. Run tests - fails with error below

ERROR:
node:internal/modules/cjs/loader:1148
throw err;
^
Error: Cannot find module './clock'

Expected behavior

"playwright.ps1 install" should not fail. If the versions are incompatible/different, then playwright.ps1 should install the version it expects.

Actual behavior

"playwright.ps1 install" fails

node:internal/modules/cjs/loader:1148
throw err;
^

Error: Cannot find module './clock'

Additional context

Cleaning the solution after changing branches is a valid workaround, but wasn't necessary before.

Environment
- Operating System: Microsoft Windows 10 Pro
- CPU: Intel64
- .NET Version (TFM): [net8.0]
Lingua principale
C#
Stelle
3k
Fork
307
Merge medio
1g 13h
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/playwright-dotnet

Tutte le issue di microsoft/playwright-dotnet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.