Error when importing -> string | URL cannot be assigned to string
See original GitHub issueJust importing on a clean project get this error
error: TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.
api_1 | Type 'URL' is not assignable to type 'string'.
api_1 | return new URL(url).pathname
api_1 | ~~~
api_1 | at https://deno.land/x/dex/lib/deps/path/win32.ts:911:18
on deno 1.2.0
ran on debian 10
with denon
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
dart - How can I resolve "The argument type 'String' can't be ...
You have to set data variable to List type. That's should work: import 'dart:convert'; import 'package:flutter/material.dart ...
Read more >Argument type 'String' can't be Assigned to type "Uri" #81200
I tried to make a world time app, but I got an error: Argument type 'String' can't be Assigned to type "Uri". Is...
Read more >Flutter – Error : the argument type int cannot be assigned to ...
error : The argument type '(int) → dynamic' can't be assigned to the parameter type '(String) → void' import 'package:flutter/material.dart'; ...
Read more >TypeScript errors and how to fix them
error TS1202 : Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from “mod”', 'import {a} from...
Read more >SyntaxError: unterminated string literal - JavaScript | MDN
The JavaScript error "unterminated string literal" occurs when there is an unterminated string literal somewhere. String literals must be enclosed by single ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I try to use deno’s 1.1.3 version,but it has error also,and I switched back to version 1.2.0
Hello avalero!
I’ve checked this error since im getting it with other imports as well, aside from denodb, and seems to be happening because the current version of deno (1.2.0) doesn’t work properly with some old std / library versions (in my case posix and dex libraries) that the current importing library is importing.
So, until denodb’s imports are updated and tested, i’d suggest you to stick with previous deno version for now.
(Also, duplicate from https://github.com/eveningkid/denodb/issues/77)
Best regards!