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

[BUG] Cannot find module package/lib/cli/cli.js #1294

Open
vemv opened this issue May 29, 2023 · 4 comments
Open

[BUG] Cannot find module package/lib/cli/cli.js #1294

vemv opened this issue May 29, 2023 · 4 comments

Comments

@vemv
Copy link

vemv commented May 29, 2023

System info

  • Playwright Version: [v1.31.0]
  • Operating System: Mac
  • Browser: All
  • Other info:

After a long-running session, a simple, unadorned Playwright.create() can start failing with:

com.microsoft.playwright.PlaywrightException: Failed to read message from driver, pipe closed.

	at com.microsoft.playwright.impl.PipeTransport.poll(PipeTransport.java:75)
	at com.microsoft.playwright.impl.Connection.processOneMessage(Connection.java:175)
	at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:109)
	at com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:119)
	at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:102)
	at com.microsoft.playwright.impl.Connection$Root.initialize(Connection.java:79)
	at com.microsoft.playwright.impl.Connection.initializePlaywright(Connection.java:152)
	at com.microsoft.playwright.impl.PlaywrightImpl.createImpl(PlaywrightImpl.java:52)
	at com.microsoft.playwright.impl.PlaywrightImpl.create(PlaywrightImpl.java:35)
	at com.microsoft.playwright.Playwright.create(Playwright.java:110)
	at com.microsoft.playwright.Playwright.create(Playwright.java:114)
Caused by: java.io.EOFException
	at com.microsoft.playwright.impl.ReaderThread.readIntLE(PipeTransport.java:110)
	at com.microsoft.playwright.impl.ReaderThread.readMessage(PipeTransport.java:139)
	at com.microsoft.playwright.impl.ReaderThread.run(PipeTransport.java:125)

It took me a long while to realise what was going on.

On stdout, which can be logged to a separate place relative to that of Java exceptions, I noticed:

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

Error: Cannot find module '/private/var/folders/yc/h50n8fgn0h79y848sfkr942h0000gn/T/playwright-java-17403553361898517108/package/lib/cli/cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1047:15)
    at Module._load (node:internal/modules/cjs/loader:893:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

So the issues that I would pinpoint/suggest are:

  • the Java exception doesn't provide a hint of what might be going on
    • in particular, it's not safe to assume that Java exceptions will be printed to the same place than stdout/stderr, so relying on node.js output alone is not self-contained
  • '/private/var/folders/yc/h50n8fgn0h79y848sfkr942h0000gn/T/playwright-java-17403553361898517108/package/lib/cli/cli.js' was gone, for whatever reason
    • hint 1: this was a very long-running session
      • are these Unix tmp files?
    • hint 2: I ran node commands in this directory during this time
      • may a node invocation spoil playwright's node?
    • neither 'hint' is necessarily conclusive - I just hope they help

After restating the JVM session, the issue was gone. Therefore it's hard to reproduce, sorry.

Thanks - V

@yury-s
Copy link
Member

yury-s commented May 30, 2023

On stdout, which can be logged to a separate place relative to that of Java exceptions, I noticed:

This is stderr output which is indeed maybe printed to a different place.

the Java exception doesn't provide a hint of what might be going on

  • in particular, it's not safe to assume that Java exceptions will be printed to the same place than stdout/stderr, so relying on node.js output alone is not self-contained

We can probably also include a few last stderr lines into the exception. Currently stderr output from the driver process is simply piped to stderr of the parent process (where the test runs), so you should already be able to see all those errors as part of stderr.

'/private/var/folders/yc/h50n8fgn0h79y848sfkr942h0000gn/T/playwright-java-17403553361898517108/package/lib/cli/cli.js' was gone, for whatever reason

  • hint 1: this was a very long-running session

    • are these Unix tmp files?

Yes, this is how playwright works today. We first extract the driver in a temp directory and then run it from there. We may replace that with a step where we download the driver once during installation / first run.

  • hint 2: I ran node commands in this directory during this time

    • may a node invocation spoil playwright's node?

Playwright doesn't expect anyone else to touch the node modules / run any node commands in that directory. Even though merely running some node.js commands in that directory may be hamless, others may well modify the driver in an unexpected way.

@vemv
Copy link
Author

vemv commented May 30, 2023

We can probably also include a few last stderr lines into the exception.

That would seem nice!

We may replace that with a step where we download the driver once during installation / first run.

Thanks for considering it.

Playwright doesn't expect anyone else to touch the node modules / run any node commands in that directory.

Sorry for the confusion, I had only run node in my project directory, not in the temp directory. I guess that no interference can happen then.

@yury-s
Copy link
Member

yury-s commented May 30, 2023

Sorry for the confusion, I had only run node in my project directory, not in the temp directory. I guess that no interference can happen then.

Yes, this should not matter.

@ctkdev1256
Copy link

having some similar scenario error, please any one. HELP....

"C:\Program Files\Java\openjdk-21\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1.1\lib\idea_rt.jar=52140:C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1.1\bin" -javaagent:C:\Users\CTram\AppData\Local\JetBrains\IntelliJIdea2024.3\captureAgent\debugger-agent.jar -Dkotlinx.coroutines.debug.enable.creation.stack.trace=false -Ddebugger.agent.enable.coroutines=true -Dkotlinx.coroutines.debug.enable.flows.stack.trace=true -Dkotlinx.coroutines.debug.enable.mutable.state.flows.stack.trace=true -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1.1\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1.1\plugins\testng\lib\testng-rt.jar;C:\Users\CTram\Desktop\playwright-automation-framework\target\test-classes;C:\Users\CTram\Desktop\playwright-automation-framework\target\classes;C:\Users\CTram.m2\repository\com\microsoft\playwright\playwright\1.45.1\playwright-1.45.1.jar;C:\Users\CTram.m2\repository\com\google\code\gson\gson\2.11.0\gson-2.11.0.jar;C:\Users\CTram.m2\repository\com\google\errorprone\error_prone_annotations\2.27.0\error_prone_annotations-2.27.0.jar;C:\Users\CTram.m2\repository\org\opentest4j\opentest4j\1.3.0\opentest4j-1.3.0.jar;C:\Users\CTram.m2\repository\com\microsoft\playwright\driver\1.45.1\driver-1.45.1.jar;C:\Users\CTram.m2\repository\com\microsoft\playwright\driver-bundle\1.45.1\driver-bundle-1.45.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-java\7.20.1\cucumber-java-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-core\7.20.1\cucumber-core-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-gherkin\7.20.1\cucumber-gherkin-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-gherkin-messages\7.20.1\cucumber-gherkin-messages-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\gherkin\28.0.0\gherkin-28.0.0.jar;C:\Users\CTram.m2\repository\io\cucumber\messages\24.1.0\messages-24.1.0.jar;C:\Users\CTram.m2\repository\io\cucumber\testng-xml-formatter\0.2.0\testng-xml-formatter-0.2.0.jar;C:\Users\CTram.m2\repository\io\cucumber\query\12.2.0\query-12.2.0.jar;C:\Users\CTram.m2\repository\io\cucumber\tag-expressions\6.1.0\tag-expressions-6.1.0.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-expressions\17.1.0\cucumber-expressions-17.1.0.jar;C:\Users\CTram.m2\repository\io\cucumber\datatable\7.20.1\datatable-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-plugin\7.20.1\cucumber-plugin-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\docstring\7.20.1\docstring-7.20.1.jar;C:\Users\CTram.m2\repository\io\cucumber\html-formatter\21.7.0\html-formatter-21.7.0.jar;C:\Users\CTram.m2\repository\io\cucumber\junit-xml-formatter\0.5.0\junit-xml-formatter-0.5.0.jar;C:\Users\CTram.m2\repository\io\cucumber\ci-environment\10.0.1\ci-environment-10.0.1.jar;C:\Users\CTram.m2\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-testng\7.20.1\cucumber-testng-7.20.1.jar;C:\Users\CTram.m2\repository\org\testng\testng\7.10.2\testng-7.10.2.jar;C:\Users\CTram.m2\repository\com\beust\jcommander\1.82\jcommander-1.82.jar;C:\Users\CTram.m2\repository\org\webjars\jquery\3.7.1\jquery-3.7.1.jar;C:\Users\CTram.m2\repository\io\cucumber\cucumber-picocontainer\7.20.0\cucumber-picocontainer-7.20.0.jar;C:\Users\CTram.m2\repository\org\picocontainer\picocontainer\2.15\picocontainer-2.15.jar;C:\Users\CTram.m2\repository\net\datafaker\datafaker\2.4.0\datafaker-2.4.0.jar;C:\Users\CTram.m2\repository\org\yaml\snakeyaml\2.3\snakeyaml-2.3.jar;C:\Users\CTram.m2\repository\com\github\curious-odd-man\rgxgen\2.0\rgxgen-2.0.jar;C:\Users\CTram.m2\repository\com\googlecode\libphonenumber\libphonenumber\8.13.46\libphonenumber-8.13.46.jar;C:\Users\CTram.m2\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar" com.intellij.rt.testng.RemoteTestNGStarter -usedefaultlisteners false -socket52139 @w@C:\Users\CTram\AppData\Local\Temp\idea_working_dirs_testng.tmp -temp C:\Users\CTram\AppData\Local\Temp\idea_testng.tmp
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Executing test suite...
Setting up Playwright...
Playwright setup complete!
Tearing down Playwright...
Tearing down Playwright!
Setting up Playwright...
Playwright setup complete!
Tearing down Playwright...
Tearing down Playwright!
Setting up Playwright...
Playwright setup complete!
Tearing down Playwright...
Tearing down Playwright!
Setting up Playwright...
Playwright setup complete!
Tearing down Playwright...
Tearing down Playwright!
Setting up Playwright...
Playwright setup complete!
Tearing down Playwright...
Tearing down Playwright!
Setting up Playwright...
Playwright setup complete!
Tearing down Playwright...
Tearing down Playwright!
Setting up Playwright...
Playwright setup complete!
Tearing down Playwright...
Tearing down Playwright!

Finished executing test suite!

===============================================
Default Suite
Total tests run: 7, Passes: 7, Failures: 0, Skips: 0

node:internal/modules/cjs/loader:1145
const err = new Error(message);
^

Error: Cannot find module './../../package.json'
Require stack:

  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at getPlaywrightVersion (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js:91:54)
    at HarTracer.stop (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\har\harTracer.js:414:54)
    at Tracing.abort (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\trace\recorder\tracing.js:203:21)
    at CRBrowserContext._didCloseInternal (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:195:18)
    at CRBrowserContext._browserClosed (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:187:10)
    at CRBrowser._didClose (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browser.js:109:52) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js'
    ]
    }

Node.js v20.14.0
node:internal/modules/cjs/loader:1145
const err = new Error(message);
^

Error: Cannot find module './../../package.json'
Require stack:

  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at getPlaywrightVersion (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js:91:54)
    at HarTracer.stop (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\har\harTracer.js:414:54)
    at Tracing.abort (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\trace\recorder\tracing.js:203:21)
    at CRBrowserContext._didCloseInternal (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:195:18)
    at CRBrowserContext._browserClosed (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:187:10)
    at CRBrowser._didClose (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browser.js:109:52) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js'
    ]
    }

Node.js v20.14.0
node:internal/modules/cjs/loader:1145
const err = new Error(message);
^

Error: Cannot find module './../../package.json'
Require stack:

  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at getPlaywrightVersion (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js:91:54)
    at HarTracer.stop (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\har\harTracer.js:414:54)
    at Tracing.abort (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\trace\recorder\tracing.js:203:21)
    at CRBrowserContext._didCloseInternal (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:195:18)
    at CRBrowserContext._browserClosed (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:187:10)
    at CRBrowser._didClose (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browser.js:109:52) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js'
    ]
    }

Node.js v20.14.0
node:internal/modules/cjs/loader:1145
const err = new Error(message);
^

Error: Cannot find module './../../package.json'
Require stack:

  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at getPlaywrightVersion (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js:91:54)
    at HarTracer.stop (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\har\harTracer.js:414:54)
    at Tracing.abort (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\trace\recorder\tracing.js:203:21)
    at CRBrowserContext._didCloseInternal (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:195:18)
    at CRBrowserContext._browserClosed (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:187:10)
    at CRBrowser._didClose (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browser.js:109:52) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js'
    ]
    }

Node.js v20.14.0
node:internal/modules/cjs/loader:1145
const err = new Error(message);
^

Error: Cannot find module './../../package.json'
Require stack:

  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at getPlaywrightVersion (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js:91:54)
    at HarTracer.stop (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\har\harTracer.js:414:54)
    at Tracing.abort (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\trace\recorder\tracing.js:203:21)
    at CRBrowserContext._didCloseInternal (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:195:18)
    at CRBrowserContext._browserClosed (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:187:10)
    at CRBrowser._didClose (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browser.js:109:52) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js'
    ]
    }

Node.js v20.14.0
node:internal/modules/cjs/loader:1145
const err = new Error(message);
^

Error: Cannot find module './../../package.json'
Require stack:

  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at getPlaywrightVersion (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js:91:54)
    at HarTracer.stop (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\har\harTracer.js:414:54)
    at Tracing.abort (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\trace\recorder\tracing.js:203:21)
    at CRBrowserContext._didCloseInternal (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:195:18)
    at CRBrowserContext._browserClosed (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:187:10)
    at CRBrowser._didClose (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browser.js:109:52) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js'
    ]
    }

Node.js v20.14.0
node:internal/modules/cjs/loader:1145
const err = new Error(message);
^

Error: Cannot find module './../../package.json'
Require stack:

  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js
  • C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at getPlaywrightVersion (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js:91:54)
    at HarTracer.stop (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\har\harTracer.js:414:54)
    at Tracing.abort (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\trace\recorder\tracing.js:203:21)
    at CRBrowserContext._didCloseInternal (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:195:18)
    at CRBrowserContext._browserClosed (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browserContext.js:187:10)
    at CRBrowser._didClose (C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\server\browser.js:109:52) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\userAgent.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\utils\index.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\lib\cli\programWithTestStub.js',
    'C:\Users\CTram\AppData\Local\Temp\playwright-java-16014884828754383049\package\cli.js'
    ]
    }

Node.js v20.14.0

Process finished with exit code 0

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

No branches or pull requests

3 participants