Just upgrade my deno to 1.2 and then my production software failure, i really need some help in hurry ,
anybody can help?
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:917: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:438: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
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:917: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:438: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:917: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:438:18
Found 8 errors.
Caused by #6653. Version of std prior to 0.61.0 are incompatible with Deno 1.2.0. deno info main.ts will give you the dependency graph and you can determine what dependencies need to be updated to they are using std 0.61.0.
hi @kitsonk thank you so much for coming and helping us, i will try :)
hi @kitsonk this is the result of deno info index.ts on my system :
`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:917: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:438: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
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:917: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:438:18
TS2339 [ERROR]: Property 'link' does not exist on type 'typeof Deno'. 'Deno.link' is an unstable API. Did you forget to run with the '--unstable' flag?
await Deno.link(src, dest);
~~~~
at https://deno.land/[email protected]/fs/ensure_link.ts:28:14
TS2339 [ERROR]: Property 'linkSync' does not exist on type 'typeof Deno'. 'Deno.linkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.linkSync(src, dest);
~~~~
at https://deno.land/[email protected]/fs/ensure_link.ts:52:8
TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'. 'Deno.symlink' is an unstable API. Did you forget to run with
the '--unstable' flag?
await Deno.symlink(src, dest, {
~~~
at https://deno.land/[email protected]/fs/ensure_symlink.ts:33:16
TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'. 'Deno.symlink' is an unstable API. Did you forget to run with
the '--unstable' flag?
await Deno.symlink(src, dest);
~~~
at https://deno.land/[email protected]/fs/ensure_symlink.ts:37:16
TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'. 'Deno.symlinkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.symlinkSync(src, dest, {
~~~
at https://deno.land/[email protected]/fs/ensure_symlink.ts:65:10
TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'. 'Deno.symlinkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.symlinkSync(src, dest);
~~~
at https://deno.land/[email protected]/fs/ensure_symlink.ts:69:10
TS2339 [ERROR]: Property 'utime' does not exist on type 'typeof Deno'. 'Deno.utime' is an unstable API. Did you forget to run with the
'--unstable' flag?
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~
at https://deno.land/[email protected]/fs/copy.ts:92:16
TS2339 [ERROR]: Property 'utimeSync' does not exist on type 'typeof Deno'. 'Deno.utimeSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/[email protected]/fs/copy.ts:103:10
TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'. 'Deno.symlink' is an unstable API. Did you forget to run with
the '--unstable' flag?
await Deno.symlink(originSrcFilePath, dest, {
~~~
at https://deno.land/[email protected]/fs/copy.ts:117:16
TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'. 'Deno.symlink' is an unstable API. Did you forget to run with
the '--unstable' flag?
await Deno.symlink(originSrcFilePath, dest);
~~~
at https://deno.land/[email protected]/fs/copy.ts:121:16
TS2339 [ERROR]: Property 'utime' does not exist on type 'typeof Deno'. 'Deno.utime' is an unstable API. Did you forget to run with the
'--unstable' flag?
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~
at https://deno.land/[email protected]/fs/copy.ts:127:16
TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'. 'Deno.symlinkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.symlinkSync(originSrcFilePath, dest, {
~~~
at https://deno.land/[email protected]/fs/copy.ts:141:10
TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'. 'Deno.symlinkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.symlinkSync(originSrcFilePath, dest);
~~~
at https://deno.land/[email protected]/fs/copy.ts:145:10
TS2339 [ERROR]: Property 'utimeSync' does not exist on type 'typeof Deno'. 'Deno.utimeSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/[email protected]/fs/copy.ts:152:10
TS2339 [ERROR]: Property 'utime' does not exist on type 'typeof Deno'. 'Deno.utime' is an unstable API. Did you forget to run with the
'--unstable' flag?
await Deno.utime(dest, srcStatInfo.atime, srcStatInfo.mtime);
~
at https://deno.land/[email protected]/fs/copy.ts:172:16
TS2339 [ERROR]: Property 'utimeSync' does not exist on type 'typeof Deno'. 'Deno.utimeSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.utimeSync(dest, srcStatInfo.atime, srcStatInfo.mtime);
~~~~~
at https://deno.land/[email protected]/fs/copy.ts:200:10
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:917: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:438:18
TS2339 [ERROR]: Property 'link' does not exist on type 'typeof Deno'. 'Deno.link' is an unstable API. Did you forget to run with the '--unstable' flag?
await Deno.link(src, dest);
~~~~
at https://deno.land/std/fs/ensure_link.ts:28:14
TS2339 [ERROR]: Property 'linkSync' does not exist on type 'typeof Deno'. 'Deno.linkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.linkSync(src, dest);
~~~~
at https://deno.land/std/fs/ensure_link.ts:52:8
TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'. 'Deno.symlink' is an unstable API. Did you forget to run with
the '--unstable' flag?
await Deno.symlink(src, dest, {
~~~
at https://deno.land/std/fs/ensure_symlink.ts:32:16
TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'. 'Deno.symlink' is an unstable API. Did you forget to run with
the '--unstable' flag?
await Deno.symlink(src, dest);
~~~
at https://deno.land/std/fs/ensure_symlink.ts:36:16
TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'. 'Deno.symlinkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.symlinkSync(src, dest, {
~~~
at https://deno.land/std/fs/ensure_symlink.ts:64:10
TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'. 'Deno.symlinkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.symlinkSync(src, dest);
~~~
at https://deno.land/std/fs/ensure_symlink.ts:68:10
TS2339 [ERROR]: Property 'utime' does not exist on type 'typeof Deno'. 'Deno.utime' is an unstable API. Did you forget to run with the
'--unstable' flag?
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~
at https://deno.land/std/fs/copy.ts:92:16
TS2339 [ERROR]: Property 'utimeSync' does not exist on type 'typeof Deno'. 'Deno.utimeSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:103:10
TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'. 'Deno.symlink' is an unstable API. Did you forget to run with
the '--unstable' flag?
await Deno.symlink(originSrcFilePath, dest, {
~~~
at https://deno.land/std/fs/copy.ts:117:16
TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'. 'Deno.symlink' is an unstable API. Did you forget to run with
the '--unstable' flag?
await Deno.symlink(originSrcFilePath, dest);
~~~
at https://deno.land/std/fs/copy.ts:121:16
TS2339 [ERROR]: Property 'utime' does not exist on type 'typeof Deno'. 'Deno.utime' is an unstable API. Did you forget to run with the
'--unstable' flag?
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~
at https://deno.land/std/fs/copy.ts:127:16
TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'. 'Deno.symlinkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.symlinkSync(originSrcFilePath, dest, {
~~~
at https://deno.land/std/fs/copy.ts:141:10
TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'. 'Deno.symlinkSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.symlinkSync(originSrcFilePath, dest);
~~~
at https://deno.land/std/fs/copy.ts:145:10
TS2339 [ERROR]: Property 'utimeSync' does not exist on type 'typeof Deno'. 'Deno.utimeSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:152:10
TS2339 [ERROR]: Property 'utime' does not exist on type 'typeof Deno'. 'Deno.utime' is an unstable API. Did you forget to run with the
'--unstable' flag?
await Deno.utime(dest, srcStatInfo.atime, srcStatInfo.mtime);
~
at https://deno.land/std/fs/copy.ts:172:16
TS2339 [ERROR]: Property 'utimeSync' does not exist on type 'typeof Deno'. 'Deno.utimeSync' is an unstable API. Did you forget to run with the '--unstable' flag?
Deno.utimeSync(dest, srcStatInfo.atime, srcStatInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:200:10
Found 40 errors.`
Caused by #6653. Version of
stdprior to 0.61.0 are incompatible with Deno 1.2.0.deno info main.tswill give you the dependency graph and you can determine what dependencies need to be updated to they are usingstd0.61.0.
how to update my std into specific version on my system??
Sorry, I forgot it tries to do a compile.
The problem is still the same, code you are using is depending on std prior to 0.61.0 and you need to update those dependencies (or get those dependencies updated). You could go back to 1.1.3 to do the deno info if you really need to see the dependency graph.
https://deno.land/[email protected]/... if you are importing it, but it looks like you are depending on code that is importing it itself, so you need to update those dependencies.
Sorry, I forgot it tries to do a compile.
The problem is still the same, code you are using is depending on
stdprior to 0.61.0 and you need to update those dependencies (or get those dependencies updated). You could go back to 1.1.3 to do thedeno infoif you really need to see the dependency graph.
hi @kitsonk we are going back to deno 1.1.3 and then we get new error but only one error :
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
So something you are using is only compatible with Deno 1.2.0 and is importing std 0.61.0 and something you are using is not compatible with Deno 1.2.0 and is using std prior to 0.61.0 (several things by the look of the original errors).
An alternative solution i need to remove some package and create alternative API using node.js, here some package that become culprit :
// export { multiParser, FormFile } from "https://deno.land/x/multiparser/mod.ts";
// export { readFileStr, readFileStrSync } from "https://deno.land/std/fs/mod.ts";
// export {
// upload,
// preUploadValidate,
// } from "https://deno.land/x/upload_middleware_for_oak_framework/mod.ts";
hi @kitsonk thank you so much for your help
I am getting this error too. But, it seems to be deep within deno
Check file:///Users/reselbob/Documents/source-tree/denodemo/pubbersubber/tests/.deno.test.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:917: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:438:18
$ deno --version
deno 1.2.0
v8 8.5.216
typescript 3.9.2
md5-0f5b148d4d9df37b69941d2941fbfaa2
git clone https://github.com/reselbob/denodemo.git
cd denodemo/pubbersubber/tests/
sh run_tests.sh
Thanks in advance. I really am at wit's end. If the trouble is my own doing, please forgive me.
@reselbob your problem is the same as the others. You are using Deno 1.2.0, but some dependency of yours is pulling in std prior to 0.61.0 (the log states it is 0.57.0). You need to identify the offending dependency and update it.
Thank you @kitsonk, sincerely.
So are you saying that one of the culprits, https://deno.land/[email protected]/path/posix.ts:438:18 is not being called within the standard library, but by a third-party module that is calling, the offender, https://deno.land/[email protected]/path/posix.ts:438:18?
I wish there was a way I could see the full stack trace.
Again, thank you!
@reselbob deno info --no-check deps.ts should show you a tree listing of all your dependencies.
reselbob@bobs-mbp deps % pwd
/Users/reselbob/Library/Caches/deno/deps
reselbob@bobs-mbp deps % deno info --no-check deps.ts
error: Cannot resolve module "file:///Users/reselbob/Library/Caches/deno/deps/deps.ts"
Am I doing something terribly wrong @Yamboy1
You should replace deps.ts with a file that you have on your local machine. Likely what you run with deno run ....
I'm so lost. how the f--- do I fix this error? There's no package manager.
@chovy Deno has a package manager built into it. if you run deno info --no-check deps.ts (replace deps.ts with whatever your main entry file is if you don't have a deps.ts), it should give you a tree view of all your dependencies. From there you can work out which dependencies are the problem, and deal with it accordingly
error: Uncaught SyntaxError: The requested module './levels.ts' does not
provide an export named 'LevelName'
On Thu, Jul 23, 2020 at 5:41 PM Yamboy1 notifications@github.com wrote:
@chovy https://github.com/chovy Deno has a package manager built into
it. if you run deno info --no-check deps.ts (replace deps.ts with
whatever your main entry file is if you don't have a deps.ts), it should
give you a tree view of all your dependencies. From there you can work out
which dependencies are the problem, and deal with it accordingly—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/denoland/deno/issues/6755#issuecomment-663299363, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAGV5IM537KXDQHOBSV3ODR5DKCFANCNFSM4O2I75SQ
.
--
Anthony Ettinger
http://anthony.ettinger.name
[email protected]
+1 (831) 406-1123
@chovy, elaborate, please. Does your comment reference something in my code?
@chovy It looks like there's an unversioned dependency on the std/log module, which is causing that error. You can try reloading the cache by running deno cache --reload deps.ts, and try again, that should hopefully fix the error.
@chovy that additional error you have is that the code is not --no-check safe. ./levels.ts is re-exporting a type that does not have a runtime emit. So instead of export { SomeInterface } from "whatever.ts" you should use export type { SomeInterface } from "whatever.ts".
I'm still having problems resolving this problem when I run:
deno info --no-check bin/server.ts
I get:
error: Uncaught SyntaxError: The requested module 'https://deno.land/[email protected]/async/mod.ts' does not provide an export named 'Deferred'
This is trying to build and run:
https://github.com/fhsinchy/deno-blog
I;m unclear how to get a current list of dependencies when what I'm currently dependent on has this issue is this all documented somewhere. Is there a deno discussion group that I can discuss this issue on?
@mwoodpatrick Join us on discord
Will do, many thanks
deno cache --unstable --reload deps.ts really solve my issue , you need to include --unstable to make sure the unstable API not throwing errors and reload it.
I had this problem after updating in a script which uses only Deno dependencies. I had to refresh the cache by running the deno cache command above. I figured it was a catching issue but wasn't sure how to resolve it. Thanks @fauzan121002
Workaround:
First: If you are using denon upgrade your denon to the last version.
In my case I'm using import map to manager my packages (--importmap=package.json), so I added the following lines:
"https://deno.land/[email protected]/path/win32.ts": "https://deno.land/[email protected]/path/win32.ts",
"https://deno.land/[email protected]/path/posix.ts": "https://deno.land/[email protected]/path/posix.ts",
"https://deno.land/[email protected]/path/win32.ts": "https://deno.land/[email protected]/path/win32.ts",
"https://deno.land/[email protected]/path/posix.ts": "https://deno.land/[email protected]/path/posix.ts"
Run your app again with "--reload". Done.
I had this problem after updating in a script which uses only Deno dependencies. I had to refresh the cache by running the
deno cachecommand above. I figured it was a catching issue but wasn't sure how to resolve it. Thanks @fauzan121002
if this command don't help you at all , you guys can try this after upgrade the deno version and fix incompatible packages :
deno run -A --unstable --reload server.ts
I have the same problem, this happens when I import my database connection file (denodb) in my index.ts. When I run the script this is this the output:
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/x/[email protected]/lib/deps/path/win32.ts:911:18TS2345 [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/x/[email protected]/lib/deps/path/posix.ts:433:18Found 2 errors.
I already tried most of the options they comment, but none of them work, I even installed version 1.2.0 but it still does not work
@angel-codes Looks like Dex made the terrible decision of copy-pasting Deno's std modules into their code, instead of importing them.
This modules are unstable, and with a recent bug fix in the definition of the URL api, also incompatible with Deno version 1.2+.
In order to fix this, downgrade to Deno 1.1.3 or lower or open an issue in Dex to fix the module. (Would be easy to make if he/she hadn't pushed the dependencies alongside the repo)
In my case I'm using import map to manager my packages (--importmap=package.json), so I added the following lines:
How to use importmap?
Most helpful comment
Caused by #6653. Version of
stdprior to 0.61.0 are incompatible with Deno 1.2.0.deno info main.tswill give you the dependency graph and you can determine what dependencies need to be updated to they are usingstd0.61.0.