manyuanrong / deno-smtp

SMTP implements for deno
MIT License
80 stars 26 forks source link

Does not work with Deno v1.2.x #27

Closed Schoude closed 3 years ago

Schoude commented 4 years ago

Hi!

Like many other third-party libraries, this one also does not yet work with Deno v1.2.x.

I get two errors when I want to run the file with the basic Gmail setup:

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@v0.52.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@v0.52.0/path/posix.ts:433:18

It seems as if std@v0.52.0 causes the problem.

Maybe you could update the std library to the version used in Deno v.1.2.x (std@0.62.0) to fix the issue for people who want to use the latest versions of Deno?

Thank you very much!

chisNaN commented 4 years ago

noticed that also thanks BUT i think its ok right now

suchislife801 commented 4 years ago

Yes. Change @v0.5.2 in ALL your script imports to @v0.6.8 which is the current version of std library for deno version 1.4.

Deno is in active development so every time you see an update there is a chance the std library gets a version update as well.

If these are not in sync, they can produce random errors like these.