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

Type 'string' is not assignable to type '“UnexpectedEof”' #11713

Closed
ralyodio opened this issue Aug 15, 2021 · 6 comments · Fixed by #11715
Closed

Type 'string' is not assignable to type '“UnexpectedEof”' #11713

ralyodio opened this issue Aug 15, 2021 · 6 comments · Fixed by #11715

Comments

@ralyodio
Copy link

Getting this error when compiling my deno app:

$ deno compile --allow-all --unstable --output ./app ./index.ts
Check file:///home/ubuntu/www/iptvfish/iptvfish-api/index.ts
error: TS2416 [ERROR]: Property 'name' in type 'PartialReadError' is not assignable to the same property in base type 'UnexpectedEof'.
  Type 'string' is not assignable to type '"UnexpectedEof"'.
  name = "PartialReadError";
  ~~~~
    at https://deno.land/std@0.74.0/io/bufio.ts:27:3
TS2416 [ERROR]: Property 'name' in type 'PartialReadError' is not assignable to the same property in base type 'UnexpectedEof'.
  Type 'string' is not assignable to type '"UnexpectedEof"'.
  name = "PartialReadError";
  ~~~~
    at https://deno.land/std@0.83.0/io/bufio.ts:27:3

Found 2 errors.
$ deno -V
deno 1.13.0

code worked before i upgraded deno

https://stackoverflow.com/questions/68788608/type-string-is-not-assignable-to-type-unexpectedeof

@ralyodio
Copy link
Author

ralyodio commented Aug 15, 2021

i'm using oak and denodb

@lucacasonato
Copy link
Member

@chovy Try update your dependencies (for example oak) to newer versions. If this does not help can you give me the output of deno info ./index.ts?

@horihiro
Copy link

I saw the same error because oak@v6.1.0, which imported old std before 0.92.0, was imported in my case,

It seems that deno@1.13.0 cannot use std@0.91.0 or before, and I think your index.ts or the dependencies imports the old std.

You can check the dependencies by the command in the lucacasonato's comment.

@tak001
Copy link

tak001 commented Aug 15, 2021

I'm having the same problem with the same error.
The environment is the same.

@ngdangtu-vn
Copy link

This happened the same in Opine, and I believe it is not any those framework fault. The root of problem lies in http_error dep. The only way is downgrade Deno to 1.12.2 and wait for the author update dep (and I'm doubt about it)

cmorten/opine#139

@lucacasonato
Copy link
Member

lucacasonato commented Aug 15, 2021

This will be fixed in tomorrow's 1.13.1 release, and in Deno canary in about 1 hour (deno upgrade --canary)

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

Successfully merging a pull request may close this issue.

5 participants