Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found error when trying to install browsers (v1.42.0) #2882

Closed
johnboygit opened this issue Mar 11, 2024 · 8 comments
Closed

Module not found error when trying to install browsers (v1.42.0) #2882

johnboygit opened this issue Mar 11, 2024 · 8 comments

Comments

@johnboygit
Copy link

Version

1.42.0

Steps to reproduce

  • Upgrade project to 1.42.0
  • Clean solution
  • Rebuild
  • run ./playwright.ps1 install from powershell

Expected behavior

browsers should install

Actual behavior

error is thrown:

.playwright\package\lib\cli\cli.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Additional context

No response

Environment

- Operating System: Windows 10
- CPU: [Intel]
- .NET Version (TFM): [net6.0]
@mxschmitt
Copy link
Member

Have you tried deleting the bin/ folder? Might be similar to #2069.

@johnboygit
Copy link
Author

just tried but it hasn't made any difference

@mxschmitt
Copy link
Member

The issue you are observing is that there is an v1.41 (old) assembly trying to interact with a recent v1.42 Playwright driver.

Could you try deleting the obj folder as well? Do you maybe depend on multiple Playwright versions in your suite?

@johnboygit
Copy link
Author

johnboygit commented Mar 11, 2024

unfortunately that hasn't helped either.

I have a solution with two projects in it.

one project is a common one that has the playwright.net NuGet package. I build and publish a NuGet package from this to be consumed by any other test project in our organisation.

the other project in my solution is a simple test project that references the common project directly just to verify things are happy before I push and build the common one. this test project does not consume the playwright.net NuGet directly.

maybe this problem is only evident when a test project consumes playwright in this manner.

Update:

even if I run the browser install command from the output folder of the common project I get the same error so I don't think it has anything to do with one project referencing another

@mxschmitt
Copy link
Member

Would it be possible to share a reproduction with us which we can run locally? Otherwise we are unfortunately not able to act on it, thanks for your understanding.

@johnboygit
Copy link
Author

PlaywrightReproIssue.zip

Please try with the attached solution

@mxschmitt
Copy link
Member

I unfortunately was not able to reproduce, deleted obj/bin directory in both of the directories.

@johnboygit
Copy link
Author

thanks. It seems to be working for me if I run powershell as admin so I'll close this issue.

I don't know why I didn't think of that before. I don't recall having to do it on previous upgrades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants