webview_deno icon indicating copy to clipboard operation
webview_deno copied to clipboard

Readme example "Uncaught NotFound"

Open LauraWebdev opened this issue 1 year ago • 0 comments

Hey there, I'm having somewhat of a hard time playing around with this. I've managed to get a codebase working with the examples provided in this repo and wanted to create a clean project with the example provided in the Readme.

import { Webview } from "https://deno.land/x/webview/mod.ts";

const html = `
  <html>
  <body>
    <h1>Hello from deno v${Deno.version.deno}</h1>
  </body>
  </html>
`;

const webview = new Webview();

webview.navigate(`data:text/html,${encodeURIComponent(html)}`);
webview.run();

Running this via deno run -Ar --unstable .\src\app.ts results in the WebView2Loader.dll being created in the src folder and the following console error:

error: Uncaught (in promise) NotFound (os error 2)
  const metadata = await Deno.readTextFile(metapath(url, ns));
                   ^
    at async Object.readTextFile (deno:runtime/js/40_read_file.js:56:20)
    at async metaread (https://deno.land/x/[email protected]/file.ts:138:20)
    at async FileWrapper.read (https://deno.land/x/[email protected]/file.ts:85:18)
    at async FileWrapper.get (https://deno.land/x/[email protected]/file.ts:108:20)
    at async cache (https://deno.land/x/[email protected]/cache.ts:67:10)
    at async Wrapper.cache (https://deno.land/x/[email protected]/cache.ts:21:12)
    at async download (https://deno.land/x/[email protected]/plug.ts:107:16)
    at async prepare (https://deno.land/x/[email protected]/plug.ts:116:16)
    at async https://deno.land/x/[email protected]/src/ffi.ts:102:20

I am running deno 1.28.1 and the examples within the examples folder of this repo (which import webview_deno locally) work flawlessly.

LauraWebdev avatar Nov 18 '22 20:11 LauraWebdev