deno.ns URL and TypeScript dom URL incompatible constructors

Created on 14 May 2020  路  32Comments  路  Source: denoland/deno

The deno standard lib declaration of URL accepts string | URL as input: https://github.com/denoland/deno/blob/a08a4abac116eda498f8ad2df13b3816ec36c9ad/cli/js/lib.deno.shared_globals.d.ts#L1149

However the TypeScript dom library declaration only accepts string:
https://github.com/microsoft/TypeScript/blob/master/src/lib/dom.generated.d.ts#L15920

When declaring "dom" in tsconfig.json like so:

"lib": ["dom", "dom.iterable", "esnext", "deno.ns"]

deno throws the following 2 errors:

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/posix.ts:433: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/win32.ts:911:18

Found 2 errors.

Probably related to https://github.com/denoland/deno/issues/4234.

bug web

Most helpful comment

Also if you are using untagged imports (such as https://deno.land/std/encoding/utf8.ts), please update those to use the 0.61.0 type import i showed above

All 32 comments

I changed that in #4993 to match browsers. I guess TS's one is wrong?

cc @kitsonk

Both Node.js and TypeScript types allow only 'string' for the 'url' argument which seems (?) to be what the spec says. However both Node and browsers also accept URL instances without any problem.

It is really obscure in the spec, but I found it:

while IDL requires a string as argument, a URL object stringifies to its href getter return value

So basically everyone is relying upon implicit coercion. 馃し Seems that this has tripped up TypeScript a few times overall as well too: https://github.com/microsoft/TSJS-lib-generator/issues/670.

I say we follow TypeScript for now, and just have people complain about it and tell people to just be explicit and use String(url) or url.toString(). More explicit is better anyways.

I have the same problem.
I think the type definition should conform to the specification.
I'll fix it and create PR.

After upgrading to 1.2.0 I am getting this error as well. Is it normal?

Best to ask on Discord: https://discord.gg/deno

It looks this is caused by the combination [email protected] and [email protected] or before.

I can confirm this, I'm getting seemingly unknown errors today. It was working all fine yesterday. I got a file not found error(os error 2) out o nowhere and then upgraded deno and getting this error.

@Sameerkash if you are Deno 1.2.0 you need std 0.61.0 or later. There features added in Deno 1.2.0 that caused breaking changes in std.

@kitsonk how can I upgrade ? Because I don't have any direct imports from std in my project right now.
Maybe it might be in cache which I used before. How can I upgrade everything in my cache ?

People seem to be getting slightly confused with all this, so lets try to clarify some stuff.

With the Deno 1.2.0 update, the URL constructor was changed so that you cannot pass a URL as input to the constructor, to realign this up with the web standards: https://developer.mozilla.org/en-US/docs/Web/API/URL/URL. As with every Deno update a new std version was released, v0.61.0.

The previous versions of the std were created for older versions of deno, and thus some of them expected the old behaviour of the URL function, which is now not the case.

Solution:

There are two possible solutions here depending on where your issue lies.

1.
If your issue lies in your dependencies, you should make an issue or pull request on the module's github to update their code to support Deno v1.2.0 and std v0.61.0. You can work out exactly where the issue lies by running deno info --no-check deps.ts. You should also downgrade to deno v1.1.3 for now, until the dependencies are fixed.

2.
If the issue only exists in your own code, you should just be able to update your imports to reference std v0.61.0, for example https://deno.land/[email protected]/encoding/utf8.ts. You won't need to downgrade, and everything should run relatively smoothly.

Also if you are using untagged imports (such as https://deno.land/std/encoding/utf8.ts), please update those to use the 0.61.0 type import i showed above

I tried importing upgrading the error links to. 0.61.0 but it just doesn't seem to be working. And something weird is happening I believe. Maybe my other dependencies might be the problem. I have oak and denodb.

@Yamboy1 thx for the clear explanation. There is just a last problem, I don't know from which dependency the problem come cause the stacktrace doesn't give much info it. Any idea to identify which deps cause the problem?

Could you send the stack trace here?

I am only getting this:
image

You can also see it in my CI:
https://github.com/apiel/adka/runs/866373327?check_suite_focus=true

Did you do the deno info thing? (Especially the --no-check part)

I downgraded the version to 1.1.3 and this is the issue I was stuck with since morning, and I had no errors yesterday, djwt is the dependency I added today

error: TS2345 [ERROR]: Argument of type '{ depth: number; sorted: boolean; trailingComma: boolean; compact: boolean; iterableLimit: number; }' is not assignable to parameter of type 'InspectOptions'.
  Object literal may only specify known properties, and 'sorted' does not exist in type 'InspectOptions'.
        sorted: true,
        ~~~~~~~~~~~~
    at https://deno.land/[email protected]/testing/asserts.ts:26:9

Could you point out where the issue might be? @Yamboy1

You can't downgrade AND upgrade to std v0.61.0, if you've downgraded, change your imports to use v0.60.0

@Yamboy1 I don't use yet the --no-check, right now I am using deno run -c tsconfig.json --allow-read --allow-write --allow-env --allow-net --unstable adka.ts. I will just wait a bit, soon or later issues will get fixed :p

Actually I did downgrade. Something wrong with my caching. It wasn't upgrading before and now it isn't downgrading.
I have specified 0.6.0 in my deps.ts and I did a --reload. @Yamboy1

As i'd said earlier, you can run deno info --no-check deps.ts or deno info --no-check adka.ts if you don't have a deps.ts file to see where the problem is @apiel

@Sameerkash Did you run it like deno run mod.ts --reload or deno run --reload mod.ts. The first one DOESN'T WORK, you need to use the second form

Please Try 鈥攗nstable And 鈥攏o-check With deno info

my deps.ts >

import { basename } from "https://deno.land/[email protected]/path/posix.ts";

my log

root@/mnt/e/Projects/deno-app $ deno run --reload deps.ts
Download https://deno.land/x/oak/mod.ts
Download https://deno.land/x/denodb/mod.ts
Download https://deno.land/x/cors/mod.ts
Download https://deno.land/x/djwt/validate.ts
Download https://deno.land/x/djwt/create.ts
Download https://deno.land/x/bcrypt/mod.ts
Download https://deno.land/[email protected]/path/posix.ts
Download https://deno.land/x/djwt/base64/base64url.ts
Download https://deno.land/[email protected]/encoding/hex.ts
Download https://deno.land/[email protected]/hash/sha256.ts
Download https://deno.land/[email protected]/hash/sha512.ts
Download https://deno.land/x/cors/types.ts
Download https://deno.land/x/cors/oakCors.ts
Download https://deno.land/x/cors/abcCors.ts
Download https://deno.land/x/cors/mithCors.ts
Download https://deno.land/x/cors/attainCors.ts
Download https://deno.land/x/denodb/lib/data-types.ts
Download https://deno.land/x/denodb/lib/database.ts
Download https://deno.land/x/denodb/lib/model.ts
Download https://deno.land/x/denodb/lib/relationships.ts
Download https://deno.land/x/bcrypt/main.ts
Download https://deno.land/[email protected]/path/_interface.ts
Download https://deno.land/[email protected]/path/_constants.ts
Download https://deno.land/[email protected]/path/_util.ts
Download https://deno.land/x/oak/application.ts
Download https://deno.land/x/oak/body.ts
Download https://deno.land/x/oak/context.ts
Download https://deno.land/x/oak/helpers.ts
Download https://deno.land/x/oak/cookies.ts
Download https://deno.land/x/oak/httpError.ts
Download https://deno.land/x/oak/middleware.ts
Download https://deno.land/x/oak/multipart.ts
Download https://deno.land/x/oak/request.ts
Download https://deno.land/x/oak/response.ts
Download https://deno.land/x/oak/router.ts
Download https://deno.land/x/oak/send.ts
Download https://deno.land/x/oak/server_sent_event.ts
Download https://deno.land/x/oak/types.d.ts
Download https://deno.land/x/oak/util.ts
Download https://deno.land/x/oak/deps.ts
Download https://deno.land/x/cors/cors.ts
Download https://deno.land/x/djwt/base64/base64.ts
Download https://deno.land/[email protected]/encoding/base64url.ts
Download https://deno.land/x/denodb/lib/connectors/connector.ts
Download https://deno.land/x/denodb/lib/query-builder.ts
Download https://deno.land/x/denodb/lib/connectors/postgres-connector.ts
Download https://deno.land/x/denodb/lib/connectors/sqlite3-connector.ts
Download https://deno.land/x/denodb/lib/connectors/mysql-connector.ts
Download https://deno.land/x/denodb/lib/connectors/mongodb-connector.ts
Download https://deno.land/x/denodb/lib/helpers/results.ts
Download https://deno.land/x/denodb/lib/translators/translator.ts
Download https://deno.land/x/denodb/lib/translators/sql-translator.ts
Download https://deno.land/x/denodb/lib/model-pivot.ts
Download https://deno.land/x/bcrypt/bcrypt/bcrypt.ts
Download https://deno.land/x/denodb/deps.ts
Download https://deno.land/x/oak/isMediaType.ts
Download https://deno.land/[email protected]/bytes/mod.ts
Download https://deno.land/[email protected]/hash/sha1.ts
Download https://deno.land/[email protected]/hash/sha256.ts
Download https://deno.land/[email protected]/http/server.ts
Download https://deno.land/[email protected]/http/http_status.ts
Download https://deno.land/[email protected]/io/bufio.ts
Download https://deno.land/[email protected]/path/mod.ts
Download https://deno.land/[email protected]/testing/asserts.ts
Download https://deno.land/[email protected]/ws/mod.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://raw.githubusercontent.com/pillarjs/path-to-regexp/v6.1.0/src/index.ts
Download https://deno.land/x/oak/negotiation/charset.ts
Download https://deno.land/x/oak/negotiation/encoding.ts
Download https://deno.land/x/oak/negotiation/language.ts
Download https://deno.land/x/oak/negotiation/mediaType.ts
Download https://deno.land/x/oak/buf_reader.ts
Download https://deno.land/x/oak/content_disposition.ts
Download https://deno.land/x/oak/headers.ts
Download https://deno.land/x/oak/keyStack.ts
Download https://deno.land/x/denodb/lib/helpers/fields.ts
Download https://deno.land/[email protected]/fmt/colors.ts
Download https://deno.land/[email protected]/path/win32.ts
Download https://deno.land/x/bcrypt/deps.ts
Download https://deno.land/x/bcrypt/bcrypt/base64.ts
Download https://deno.land/[email protected]/testing/diff.ts
Download https://deno.land/x/[email protected]/db.ts
Download https://deno.land/x/[email protected]/deps.ts
Download https://deno.land/x/oak/mediaTyper.ts
Download https://deno.land/x/oak/negotiation/common.ts
Download https://deno.land/[email protected]/encoding/utf8.ts
Download https://deno.land/[email protected]/_util/assert.ts
Download https://deno.land/[email protected]/async/mod.ts
Download https://deno.land/[email protected]/http/_io.ts
Download https://deno.land/[email protected]/_util/has_own_property.ts
Download https://deno.land/[email protected]/io/ioutil.ts
Download https://deno.land/[email protected]/textproto/mod.ts
Download https://deno.land/[email protected]/async/deferred.ts
Download https://deno.land/x/color/index.ts
Download https://deno.land/x/dex/mod.ts
Download https://deno.land/x/case/mod.ts
Download https://deno.land/x/postgres/mod.ts
Download https://deno.land/x/mysql/mod.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/[email protected]/path/_constants.ts
Download https://deno.land/[email protected]/path/posix.ts
Download https://deno.land/[email protected]/path/common.ts
Download https://deno.land/[email protected]/path/separator.ts
Download https://deno.land/[email protected]/path/_interface.ts
Download https://deno.land/[email protected]/path/glob.ts
Download https://deno.land/[email protected]/encoding/base64.ts
Download https://deno.land/[email protected]/encoding/utf8.ts
Download https://deno.land/[email protected]/path/_util.ts
Download https://deno.land/x/oak/tssCompare.ts
Download https://deno.land/[email protected]/async/delay.ts
Download https://deno.land/[email protected]/async/mux_async_iterator.ts
Download https://deno.land/x/dex/lib/index.js
Download https://deno.land/x/postgres/client.ts
Download https://deno.land/x/postgres/error.ts
Download https://deno.land/x/postgres/pool.ts
Download https://deno.land/x/case/camelCase.ts
Download https://deno.land/x/case/constantCase.ts
Download https://deno.land/x/case/dotCase.ts
Download https://deno.land/x/case/headerCase.ts
Download https://deno.land/x/case/lowerCase.ts
Download https://deno.land/x/case/lowerFirstCase.ts
Download https://deno.land/x/case/normalCase.ts
Download https://deno.land/x/case/paramCase.ts
Download https://deno.land/x/case/pascalCase.ts
Download https://deno.land/x/case/pathCase.ts
Download https://deno.land/x/case/sentenceCase.ts
Download https://deno.land/x/case/snakeCase.ts
Download https://deno.land/x/case/swapCase.ts
Download https://deno.land/x/case/titleCase.ts
Download https://deno.land/x/case/upperCase.ts
Download https://deno.land/x/case/upperFirstCase.ts
Download https://deno.land/x/[email protected]/src/db.ts
Download https://deno.land/x/[email protected]/src/rows.ts
Download https://deno.land/x/[email protected]/src/constants.ts
Download https://deno.land/x/mysql/src/client.ts
Download https://deno.land/x/mysql/src/connection.ts
Download https://deno.land/[email protected]/path/_globrex.ts
Download https://deno.land/x/postgres/connection.ts
Download https://deno.land/x/dex/lib/knex.js
Download https://deno.land/x/postgres/connection_params.ts
Download https://deno.land/x/postgres/deferred.ts
Download https://deno.land/x/postgres/query.ts
Download https://deno.land/x/case/types.ts
Download https://deno.land/x/case/vendor/nonWordRegexp.ts
Download https://deno.land/x/case/vendor/camelCaseRegexp.ts
Download https://deno.land/x/case/vendor/camelCaseUpperRegexp.ts
Download https://deno.land/x/dex/lib/raw.js
Download https://deno.land/x/dex/lib/client.js
Download https://deno.land/x/dex/lib/query/builder.js
Download https://deno.land/x/dex/lib/query/methods.js
Download https://deno.land/x/dex/lib/util/make-knex.js
Download https://deno.land/x/dex/lib/util/parse-connection.js
Download https://deno.land/x/dex/lib/util/timeout.js
Download https://deno.land/x/dex/lib/util/fake-client.js
Download https://deno.land/x/dex/lib/constants.js
Download https://deno.land/x/dex/lib/helpers.js
Download https://deno.land/x/dex/lib/dialects/mssql/index.js
Download https://deno.land/x/dex/lib/dialects/mysql/index.js
Download https://deno.land/x/dex/lib/dialects/mysql2/index.js
Download https://deno.land/x/dex/lib/dialects/oracledb/index.js
Download https://deno.land/x/dex/lib/dialects/postgres/index.js
Download https://deno.land/x/dex/lib/dialects/redshift/index.js
Download https://deno.land/x/dex/lib/dialects/sqlite3/index.js
Download https://deno.land/x/[email protected]/build/sqlite.js
Download https://deno.land/x/[email protected]/src/wasm.ts
Download https://deno.land/x/[email protected]/src/error.ts
Download https://deno.land/x/mysql/src/constant/errors.ts
Download https://deno.land/x/mysql/src/deferred.ts
Download https://deno.land/x/mysql/src/logger.ts
Download https://deno.land/x/postgres/utils.ts
Download https://deno.land/x/postgres/deps.ts
Download https://deno.land/x/postgres/encode.ts
Download https://deno.land/x/postgres/decode.ts
Download https://deno.land/x/mysql/deps.ts
Download https://deno.land/x/mysql/src/packets/builders/auth.ts
Download https://deno.land/x/mysql/src/packets/builders/query.ts
Download https://deno.land/x/mysql/src/packets/packet.ts
Download https://deno.land/x/mysql/src/packets/parsers/err.ts
Download https://deno.land/x/mysql/src/packets/parsers/handshake.ts
Download https://deno.land/x/mysql/src/packets/parsers/result.ts
Download https://deno.land/x/dex/lib/deps/[email protected]/inherits.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/events.js
Download https://deno.land/x/dex/lib/deps/[email protected]/src/index.js
Download https://deno.land/x/dex/lib/deps/[email protected]/index.js
Download https://deno.land/x/dex/lib/util/save-async-stack.js
Download https://deno.land/x/dex/lib/deps/uuid/mod.ts
Download https://deno.land/x/dex/lib/interface.js
Download https://deno.land/x/dex/lib/ref.js
Download https://deno.land/x/dex/lib/runner.js
Download https://deno.land/x/dex/lib/formatter.js
Download https://deno.land/x/dex/lib/transaction.js
Download https://deno.land/x/dex/lib/query/compiler.js
Download https://deno.land/x/dex/lib/schema/builder.js
Download https://deno.land/x/dex/lib/schema/compiler.js
Download https://deno.land/x/dex/lib/schema/tablebuilder.js
Download https://deno.land/x/dex/lib/schema/tablecompiler.js
Download https://deno.land/x/dex/lib/schema/columnbuilder.js
Download https://deno.land/x/dex/lib/schema/columncompiler.js
Download https://deno.land/x/dex/lib/deps/[email protected]/dist/tarn.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/util.js
Download https://deno.land/x/dex/lib/query/string.js
Download https://deno.land/x/dex/lib/logger.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/assert.js
Download https://deno.land/x/dex/lib/query/joinclause.js
Download https://deno.land/x/dex/lib/query/constants.js
Download https://deno.land/x/dex/lib/migrate/Migrator.js
Download https://deno.land/x/dex/lib/seed/Seeder.js
Download https://deno.land/x/dex/lib/functionhelper.js
Download https://deno.land/x/dex/lib/util/batchInsert.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/url.js
Download https://deno.land/x/dex/lib/deps/[email protected]/index.js
Download https://deno.land/x/postgres/packet_writer.ts
Download https://deno.land/x/postgres/packet_reader.ts
Download https://deno.land/x/dex/lib/dialects/mysql2/transaction.js
Download https://deno.land/x/dex/lib/dialects/redshift/transaction.js
Download https://deno.land/x/dex/lib/dialects/redshift/query/compiler.js
Download https://deno.land/x/dex/lib/dialects/redshift/schema/columnbuilder.js
Download https://deno.land/x/dex/lib/dialects/redshift/schema/columncompiler.js
Download https://deno.land/x/dex/lib/dialects/redshift/schema/tablecompiler.js
Download https://deno.land/x/dex/lib/dialects/redshift/schema/compiler.js
Download https://deno.land/x/dex/lib/dialects/sqlite3/query/compiler.js
Download https://deno.land/x/dex/lib/dialects/sqlite3/schema/compiler.js
Download https://deno.land/x/dex/lib/dialects/sqlite3/schema/columncompiler.js
Download https://deno.land/x/dex/lib/dialects/sqlite3/schema/tablecompiler.js
Download https://deno.land/x/dex/lib/dialects/sqlite3/schema/ddl.js
Download https://deno.land/x/dex/lib/dialects/sqlite3/formatter.js
Download https://deno.land/x/dex/lib/dialects/mssql/transaction.js
Download https://deno.land/x/dex/lib/dialects/mssql/query/compiler.js
Download https://deno.land/x/dex/lib/dialects/mssql/schema/compiler.js
Download https://deno.land/x/dex/lib/dialects/mssql/schema/tablecompiler.js
Download https://deno.land/x/dex/lib/dialects/mssql/schema/columncompiler.js
Download https://deno.land/x/dex/lib/dialects/postgres/query/compiler.js
Download https://deno.land/x/dex/lib/dialects/postgres/schema/columncompiler.js
Download https://deno.land/x/dex/lib/dialects/postgres/schema/tablecompiler.js
Download https://deno.land/x/dex/lib/dialects/postgres/schema/compiler.js
Download https://deno.land/x/dex/lib/dialects/mysql/transaction.js
Download https://deno.land/x/dex/lib/dialects/mysql/query/compiler.js
Download https://deno.land/x/dex/lib/dialects/mysql/schema/compiler.js
Download https://deno.land/x/dex/lib/dialects/mysql/schema/tablecompiler.js
Download https://deno.land/x/dex/lib/dialects/mysql/schema/columncompiler.js
Download https://deno.land/x/dex/lib/dialects/oracledb/query/compiler.js
Download https://deno.land/x/dex/lib/dialects/oracledb/schema/columncompiler.js
Download https://deno.land/x/dex/lib/dialects/oracledb/utils.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/stream.js
Download https://deno.land/x/dex/lib/dialects/oracledb/transaction.js
Download https://deno.land/x/dex/lib/dialects/oracle/index.js
Download https://deno.land/x/dex/lib/dialects/oracle/formatter.js
Download https://deno.land/x/mysql/src/buffer.ts
Download https://deno.land/x/postgres/oid.ts
Download https://deno.land/x/postgres/array_parser.ts
Download https://deno.land/[email protected]/async/mod.ts
Download https://deno.land/[email protected]/encoding/utf8.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/[email protected]/util.ts
Download https://deno.land/x/[email protected]/log/mod.ts
Download https://deno.land/x/mysql/src/constant/capabilities.ts
Download https://deno.land/x/mysql/src/auth.ts
Download https://deno.land/x/mysql/src/constant/charset.ts
Download https://deno.land/x/[email protected]/build/vfs.js
Download https://deno.land/x/mysql/src/constant/mysql_types.ts
Download https://deno.land/[email protected]/io/bufio.ts
Download https://deno.land/[email protected]/io/util.ts
Download https://deno.land/[email protected]/async/deferred.ts
Download https://deno.land/x/[email protected]/mod.ts
Download https://deno.land/x/dex/lib/deps/[email protected]/inherits.dew.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/chunk-dac557ba.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/chunk-0c2d1322.js
Download https://deno.land/x/dex/lib/deps/colors/colors.ts
Download https://deno.land/x/dex/lib/schema/helpers.js
Download https://deno.land/x/dex/lib/util/finally-mixin.js
Download https://deno.land/x/dex/lib/deps/[email protected]/src/index.dew.js
Download https://deno.land/x/dex/lib/deps/[email protected]/index.dew.js
Download https://deno.land/x/dex/lib/deps/uuid/v1.ts
Download https://deno.land/x/dex/lib/deps/uuid/v4.ts
Download https://deno.land/x/dex/lib/deps/uuid/v5.ts
Download https://deno.land/x/dex/lib/deps/[email protected]/dist/tarn.dew.js
Download https://deno.land/x/dex/lib/migrate/table-resolver.js
Download https://deno.land/x/dex/lib/migrate/table-creator.js
Download https://deno.land/x/dex/lib/migrate/migration-list-resolver.js
Download https://deno.land/x/dex/lib/migrate/MigrationGenerator.js
Download https://deno.land/x/dex/lib/migrate/configuration-merger.js
Download https://deno.land/x/dex/lib/util/delay.js
Download https://deno.land/x/dex/lib/deps/[email protected]/index.dew.js
Download https://deno.land/x/dex/lib/deps/path/mod.ts
Download https://deno.land/x/dex/lib/util/fs.js
Download https://deno.land/x/dex/lib/util/template.js
Download https://deno.land/x/dex/lib/util/noop.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/punycode.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/querystring.js
Download https://deno.land/x/dex/lib/dialects/oracle/schema/columncompiler.js
Download https://deno.land/x/dex/lib/dialects/oracle/utils.js
Download https://deno.land/x/dex/lib/dialects/oracle/schema/compiler.js
Download https://deno.land/x/dex/lib/dialects/oracle/schema/columnbuilder.js
Download https://deno.land/x/dex/lib/dialects/oracle/schema/tablecompiler.js
Download https://deno.land/x/[email protected]/log/logger.ts
Download https://deno.land/x/[email protected]/log/handlers.ts
Download https://deno.land/x/[email protected]/testing/asserts.ts
Download https://deno.land/x/[email protected]/log/levels.ts
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/buffer.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/chunk-6e68c801.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/chunk-cffba9d4.js
Download https://deno.land/x/[email protected]/deps.ts
Download https://deno.land/[email protected]/async/deferred.ts
Download https://deno.land/[email protected]/async/delay.ts
Download https://deno.land/[email protected]/async/mux_async_iterator.ts
Download https://deno.land/x/[email protected]/hash.ts
Download https://deno.land/x/dex/lib/dialects/oracle/query/compiler.js
Download https://deno.land/x/dex/lib/deps/[email protected]/dist/Pool.dew.js
Download https://deno.land/x/dex/lib/deps/[email protected]/dist/TimeoutError.dew.js
Download https://deno.land/x/dex/lib/migrate/sources/fs-migrations.js
Download https://deno.land/x/dex/lib/deps/[email protected]/src/browser.dew.js
Download https://deno.land/x/dex/lib/deps/[email protected]/src/node.dew.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/process.js
Download https://deno.land/x/dex/lib/deps/uuid/_common.ts
Download https://deno.land/x/dex/lib/deps/[email protected]/inherits_browser.dew.js
Download https://deno.land/[email protected]/path/mod.ts
Download https://deno.land/[email protected]/encoding/utf8.ts
Download https://deno.land/x/dex/lib/dialects/oracle/schema/trigger.js
Download https://deno.land/x/[email protected]/hash.ts
Download https://deno.land/[email protected]/testing/asserts.ts
Download https://deno.land/x/dex/lib/deps/hash/sha1.ts
Download https://deno.land/x/dex/lib/deps/node/util.ts
Download https://deno.land/x/dex/lib/deps/testing/asserts.ts
Download https://deno.land/x/dex/lib/deps/path/win32.ts
Download https://deno.land/x/dex/lib/deps/path/posix.ts
Download https://deno.land/x/dex/lib/deps/path/common.ts
Download https://deno.land/x/dex/lib/deps/path/separator.ts
Download https://deno.land/x/dex/lib/deps/path/interface.ts
Download https://deno.land/x/dex/lib/deps/path/glob.ts
Download https://deno.land/x/dex/lib/deps/[email protected]/lodash.dew.js
Download https://deno.land/x/[email protected]/sha1.ts
Download https://deno.land/x/[email protected]/md5.ts
Download https://deno.land/x/[email protected]/fmt/colors.ts
Download https://deno.land/x/[email protected]/fs/exists.ts
Download https://denopkg.com/chiefbiiko/[email protected]/mod.ts
Download https://deno.land/x/dex/lib/deps/[email protected]/src/common.dew.js
Download https://deno.land/x/dex/lib/deps/[email protected]/dist/PendingOperation.dew.js
Download https://deno.land/x/dex/lib/deps/[email protected]/dist/Resource.dew.js
Download https://deno.land/x/dex/lib/deps/[email protected]/dist/utils.dew.js
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/timers.js
Download https://deno.land/[email protected]/path/win32.ts
Download https://deno.land/[email protected]/path/posix.ts
Download https://deno.land/[email protected]/path/common.ts
Download https://deno.land/[email protected]/path/separator.ts
Download https://deno.land/[email protected]/path/interface.ts
Download https://deno.land/[email protected]/path/glob.ts
Download https://deno.land/x/dex/lib/deps/@jspm/[email protected]/nodelibs/tty.js
Download https://deno.land/x/[email protected]/testing/diff.ts
Download https://deno.land/x/[email protected]/sha1.ts
Download https://deno.land/x/[email protected]/md5.ts
Download https://deno.land/[email protected]/fmt/colors.ts
Download https://deno.land/[email protected]/testing/diff.ts
Download https://deno.land/x/[email protected]/format.ts
Download https://deno.land/x/[email protected]/deps.ts
Download https://deno.land/x/dex/lib/deps/path/_constants.ts
Download https://deno.land/x/dex/lib/deps/path/_util.ts
Download https://deno.land/x/dex/lib/deps/path/_globrex.ts
Download https://deno.land/x/dex/lib/deps/[email protected]/index.dew.js
Download https://deno.land/[email protected]/path/_constants.ts
Download https://deno.land/[email protected]/path/_util.ts
Download https://deno.land/x/dex/lib/deps/[email protected]/dist/PromiseInspection.dew.js
Download https://deno.land/[email protected]/path/_globrex.ts
Download https://deno.land/x/dex/lib/deps/fmt/colors.ts
Download https://deno.land/x/dex/lib/deps/testing/diff.ts
Download https://deno.land/[email protected]/fmt/colors.ts
Download https://raw.githubusercontent.com/chiefbiiko/std-encoding/v1.0.0/mod.ts
Download https://deno.land/x/base64/base64url.ts
Download https://deno.land/x/base64/base.ts
Check file:///mnt/e/Projects/deno-app/deps.ts
error: TS2345 [ERROR]: Argument of type '{ depth: number; sorted: boolean; trailingComma: boolean; compact: boolean; iterableLimit: number; }' is not assignable to parameter of type 'InspectOptions'.
  Object literal may only specify known properties, and 'sorted' does not exist in type 'InspectOptions'.
        sorted: true,
        ~~~~~~~~~~~~
    at https://deno.land/[email protected]/testing/asserts.ts:26:9

^ Please make sure that you are using oak version v5.3.1, which is the last version that supports Deno 1.1.3. It looks like you are using an untagged import, which will use the latest version. It is highly recommended to have a version on ALL imports. Please only use tagged imports, which specify a direct version

So, if I'm in version 1.2 the problem might be of other dependencies, right? and --no-check did not work. I applied tags to all my imports but now getting this error on deno run --reload,

error: Import 'https://deno.land/x/[email protected]/mod.ts' failed: 404 Not Found

@Yamboy1

@Sameerkash, oak uses a v at the start of the version tag

That was really silly of me to not observe.
@Yamboy1 Thank you so much for your time. I've downgraded everything to 1.1.3 for now, Maybe it is one of my other dependencies that was causing the std error in on version 1.2. My code seems to be working for now. I'll check out the versions and then upgrade later.
Thanks again.

If you or your dependencies use an older version of std, yes. Looks like dex needs to update its dependencies: https://github.com/denjucks/dex/pull/8

For now i would recommend either finding an updated alternative, or downgrading to 1.1.3 for the time being

I had the same problem and this mongodb import import { init, MongoClient } from 'https://deno.land/x/[email protected]/mod.ts' made it, because this package uses https://deno.land/[email protected] which doesn't exist anymore . So, if you are using mongodb, you can replace that version with https://deno.land/x/[email protected]/mod.ts or you have an alternative here: https://deno.land/x/denodb. If you don't use mongodb, check with deno info --no-check app.ts which file and import statement uses some packages which doesn't exist anymore. After you remove those imports, run deno server again with flag --reload

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JosephAkayesi picture JosephAkayesi  路  3Comments

benjamingr picture benjamingr  路  3Comments

kitsonk picture kitsonk  路  3Comments

ry picture ry  路  3Comments

CruxCv picture CruxCv  路  3Comments