So i was forgot to change directory, into directory that contain index.ts.
i am not aware that i was execute
deno run -A --unstable index.ts on empty dir...
and i got this error message, so i thought the problem is on my apps
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: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
Found 2 errors.
deno info --no-check your_entry_file.js
Better suited for discord though Deno discord
and if we execute this command in empty directory :
deno run -A --unstable index.ts
the error above also coming
You should be importing [email protected]. Also make sure you are on Deno v1.3.0. (run deno upgrade to update)
You sure the dir is empty? Cause then it should throw because index.ts doesn't exist
yes on my windows OS, it does not return wrong error message like above so i was confused.
You should be importing [email protected]. Also make sure you are on Deno v1.3.0. (run
deno upgradeto update)
yes its the newest version. i change the title and problem
Can you run dir on the folder you say it's empty? Also try to do echo $DENO_DIR and navigate to the folder it outputs
make sure you are on [email protected]. The log clearly states you are on an old version of std
Do you have any other dependencies? Maybe one of those also depends on [email protected], use deno info mod.ts to see a full dependency list
Most helpful comment
You should be importing [email protected]. Also make sure you are on Deno v1.3.0. (run
deno upgradeto update)