<p dir="auto">Using <del>WSL</del> WSL 2 on Windows 10 does not appear to install any browser when I yarn install.  I have not tested it on WSL 1.</p>
<p dir="auto">Running your reference examples results in:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$yarn install
yarn install v1.21.1
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.07s.
() /.../playwright $node main.js 
(node:1704) UnhandledPromiseRejectionWarning: Error: Chromium revision is not downloaded. Run &quot;npm install&quot; or &quot;yarn install&quot;
    at CRPlaywright.launchServer (/home/-/playwright/node_modules/playwright-core/lib/server/crPlaywright.js:87:23)
    at async CRPlaywright.launch (/home/-/playwright/node_modules/playwright-core/lib/server/crPlaywright.js:64:24)
    at async /home/-/playwright/main.js:4:21
  -- ASYNC --
    at CRPlaywright.&lt;anonymous&gt; (/home/-/playwright/node_modules/playwright-core/lib/helper.js:54:23)
    at CRPlaywright.launch (/home/-/playwright/node_modules/playwright-core/lib/server/crPlaywright.js:64:35)
    at CRPlaywright.&lt;anonymous&gt; (/home/-/playwright/node_modules/playwright-core/lib/helper.js:55:31)
    at /home/-/playwright/main.js:4:38
    at Object.&lt;anonymous&gt; (/home/-/playwright/main.js:9:3)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
  -- ASYNC --
    at CRPlaywright.&lt;anonymous&gt; (/home/-/playwright/node_modules/playwright-core/lib/helper.js:54:23)
    at /home/-/playwright/main.js:4:38
    at Object.&lt;anonymous&gt; (/home/-/playwright/main.js:9:3)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
(node:1704) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1704) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code."><pre class="notranslate"><code class="notranslate">$yarn install
yarn install v1.21.1
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.07s.
() /.../playwright $node main.js 
(node:1704) UnhandledPromiseRejectionWarning: Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at CRPlaywright.launchServer (/home/-/playwright/node_modules/playwright-core/lib/server/crPlaywright.js:87:23)
    at async CRPlaywright.launch (/home/-/playwright/node_modules/playwright-core/lib/server/crPlaywright.js:64:24)
    at async /home/-/playwright/main.js:4:21
  -- ASYNC --
    at CRPlaywright.&lt;anonymous&gt; (/home/-/playwright/node_modules/playwright-core/lib/helper.js:54:23)
    at CRPlaywright.launch (/home/-/playwright/node_modules/playwright-core/lib/server/crPlaywright.js:64:35)
    at CRPlaywright.&lt;anonymous&gt; (/home/-/playwright/node_modules/playwright-core/lib/helper.js:55:31)
    at /home/-/playwright/main.js:4:38
    at Object.&lt;anonymous&gt; (/home/-/playwright/main.js:9:3)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
  -- ASYNC --
    at CRPlaywright.&lt;anonymous&gt; (/home/-/playwright/node_modules/playwright-core/lib/helper.js:54:23)
    at /home/-/playwright/main.js:4:38
    at Object.&lt;anonymous&gt; (/home/-/playwright/main.js:9:3)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
(node:1704) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1704) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// package.json
{
  &quot;name&quot;: &quot;playwright&quot;,
  &quot;version&quot;: &quot;1.0.0&quot;,
  &quot;main&quot;: &quot;index.js&quot;,
  &quot;license&quot;: &quot;MIT&quot;,
  &quot;dependencies&quot;: {
    &quot;@types/node&quot;: &quot;^13.1.8&quot;,
    &quot;playwright&quot;: &quot;^0.9.21&quot;
  }
}"><pre class="notranslate"><code class="notranslate">// package.json
{
  "name": "playwright",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "@types/node": "^13.1.8",
    "playwright": "^0.9.21"
  }
}
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// main.ts
const playwright = require('playwright').chromium;  // Or 'firefox' or 'webkit'.

(async () =&gt; {
  const browser = await playwright.launch();
  const context = await browser.newContext();
  const page = await context.newPage('http://example.com');
  // other actions...
  await browser.close();
})();"><pre class="notranslate"><code class="notranslate">// main.ts
const playwright = require('playwright').chromium;  // Or 'firefox' or 'webkit'.

(async () =&gt; {
  const browser = await playwright.launch();
  const context = await browser.newContext();
  const page = await context.newPage('http://example.com');
  // other actions...
  await browser.close();
})();
</code></pre></div>
<p dir="auto">Compiles to</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;
// main.ts
const playwright = require('playwright').chromium; // Or 'firefox' or 'webkit'.
(async () =&gt; {
    const browser = await playwright.launch();
    const context = await browser.newContext();
    const page = await context.newPage('http://example.com');
    // other actions...
    await browser.close();
})();"><pre class="notranslate"><code class="notranslate">"use strict";
// main.ts
const playwright = require('playwright').chromium; // Or 'firefox' or 'webkit'.
(async () =&gt; {
    const browser = await playwright.launch();
    const context = await browser.newContext();
    const page = await context.newPage('http://example.com');
    // other actions...
    await browser.close();
})();
</code></pre></div>
<p dir="auto">First of all, thanks for the work on this project! The prospect of a more platform-agnostic alternative to Puppeteer is exciting.</p>
<p dir="auto">I'm trying to run the example project locally and ran into an issue, hoping maybe someone can point me in the right direction.</p>
<h2 dir="auto">The issue</h2>
<p dir="auto">I have a file, <code class="notranslate">test.ts</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const pw = require('playwright');

(async () =&gt; {
  const browser = await pw.firefox.launch({ headless: false }); // 'webkit', 'chromium', 'firefox'
  const context = await browser.newContext();
  const page = await context.newPage();

  await page.goto('https://www.example.com/');
  await page.screenshot({ path: 'example.png' });

  await browser.close();
})();"><pre class="notranslate"><code class="notranslate">const pw = require('playwright');

(async () =&gt; {
  const browser = await pw.firefox.launch({ headless: false }); // 'webkit', 'chromium', 'firefox'
  const context = await browser.newContext();
  const page = await context.newPage();

  await page.goto('https://www.example.com/');
  await page.screenshot({ path: 'example.png' });

  await browser.close();
})();
</code></pre></div>
<p dir="auto">When I run <code class="notranslate">node test.ts</code> I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" UnhandledPromiseRejectionWarning: Error: Failed to launch browser!


TROUBLESHOOTING: https://github.com/Microsoft/playwright/blob/master/docs/troubleshooting.md

    at onClose (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/server/processLauncher.js:135:20)
    at Interface.helper_1.helper.addEventListener (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/server/processLauncher.js:128:65)
    at Interface.emit (events.js:202:15)
    at Interface.close (readline.js:395:8)
    at Socket.onend (readline.js:173:10)
    at Socket.emit (events.js:202:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at processTicksAndRejections (internal/process/next_tick.js:76:17)
  -- ASYNC --
    at FFPlaywright.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/helper.js:54:23)
    at FFPlaywright.launch (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/server/ffPlaywright.js:63:35)
    at FFPlaywright.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/helper.js:55:31)
    at /mnt/c/Users/joshs/repos/Bullet/api/test.ts:4:36
    at Object.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/test.ts:12:3)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)    
  -- ASYNC --
    at FFPlaywright.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/helper.js:54:23)
    at /mnt/c/Users/joshs/repos/Bullet/api/test.ts:4:36
    at Object.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/test.ts:12:3)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)    
    at Function.Module.runMain (internal/modules/cjs/loader.js:797:12) 
    at executeUserCode (internal/bootstrap/node.js:526:15)
(node:9422) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9422) [DEP0018] DeprecationWarning: Unhandled promise rejections 
are deprecated. In the future, promise rejections that are not handled 
will terminate the Node.js process with a non-zero exit code."><pre class="notranslate"><code class="notranslate"> UnhandledPromiseRejectionWarning: Error: Failed to launch browser!


TROUBLESHOOTING: https://github.com/Microsoft/playwright/blob/master/docs/troubleshooting.md

    at onClose (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/server/processLauncher.js:135:20)
    at Interface.helper_1.helper.addEventListener (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/server/processLauncher.js:128:65)
    at Interface.emit (events.js:202:15)
    at Interface.close (readline.js:395:8)
    at Socket.onend (readline.js:173:10)
    at Socket.emit (events.js:202:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at processTicksAndRejections (internal/process/next_tick.js:76:17)
  -- ASYNC --
    at FFPlaywright.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/helper.js:54:23)
    at FFPlaywright.launch (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/server/ffPlaywright.js:63:35)
    at FFPlaywright.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/helper.js:55:31)
    at /mnt/c/Users/joshs/repos/Bullet/api/test.ts:4:36
    at Object.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/test.ts:12:3)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)    
  -- ASYNC --
    at FFPlaywright.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/node_modules/playwright-core/lib/helper.js:54:23)
    at /mnt/c/Users/joshs/repos/Bullet/api/test.ts:4:36
    at Object.&lt;anonymous&gt; (/mnt/c/Users/joshs/repos/Bullet/api/test.ts:12:3)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)    
    at Function.Module.runMain (internal/modules/cjs/loader.js:797:12) 
    at executeUserCode (internal/bootstrap/node.js:526:15)
(node:9422) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9422) [DEP0018] DeprecationWarning: Unhandled promise rejections 
are deprecated. In the future, promise rejections that are not handled 
will terminate the Node.js process with a non-zero exit code.
</code></pre></div>
<h2 dir="auto">What I'm running</h2>
<p dir="auto">I'm running WSL on Windows 10, Node 11.9.0.</p>
<h2 dir="auto">What I've tried</h2>
<p dir="auto">I had similar code integrated more deeply into an application I'm working on. I pulled the code out into the simplest reproducible case I could, which is the code above.</p>
<p dir="auto">I've tried switching between firefox, chromium, and webkit. I've also tried setting <code class="notranslate">headless</code> to false.</p>
<p dir="auto">Any help or guidance you might be able to offer is appreciated!</p>