deno-api-starter-oak
deno-api-starter-oak copied to clipboard
Error when running
I just tried running the app and got an error:
❯ deno run --allow-read --allow-net --unstable app.ts
Check file:///p/examples/deno-api-starter-oak/app.ts
error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.
Type 'URL' is not assignable to type 'string'.
return new URL(url).pathname
~~~
at https://deno.land/[email protected]/path/win32.ts:911:18
TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.
Type 'URL' is not assignable to type 'string'.
return new URL(url).pathname;
~~~
at https://deno.land/[email protected]/path/posix.ts:433:18
Found 2 errors.
I'm on the latest Deno version:
❯ deno --version
deno 1.3.1
v8 8.6.334
typescript 3.9.7
But it seems maybe that the Standard Library has changed? I just tried the container and it still builds and runs.
Ok, I found it, it is related to the latest Deno and stdlib: https://github.com/denoland/deno/issues/6755 I got it to work, I'll learn more about this sample, if I can get it to work I'll send a PR.
You can see what I changed here: https://github.com/giggio-samples/deno-api-starter-oak/commit/a66ba95ea8aaa0f0dc0ce4812b15d17a8171f8fc Apart from the change on the .env file, would you like me to send a PR?
@giggio please send PR, would be great to have more people contributing here.