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

Error when running #9

Open
giggio opened this issue Aug 23, 2020 · 3 comments
Open

Error when running #9

giggio opened this issue Aug 23, 2020 · 3 comments

Comments

@giggio
Copy link

giggio commented Aug 23, 2020

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/std@0.53.0/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/std@0.53.0/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.

@giggio
Copy link
Author

giggio commented Aug 23, 2020

Ok, I found it, it is related to the latest Deno and stdlib: denoland/deno#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.

@giggio
Copy link
Author

giggio commented Aug 23, 2020

You can see what I changed here: giggio-samples@a66ba95
Apart from the change on the .env file, would you like me to send a PR?

@asad-mlbd
Copy link
Owner

@giggio please send PR, would be great to have more people contributing here.

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