Typescript typing errors with Deno
See original GitHub issueUsing date-fns with typescript and Deno 1.0 produces the following error:
Uncaught URIError: relative import path "date-fns" not prefixed with / or ./ or ../ Imported from "https://cdn.pika.dev/-/date-fns@v2.13.0-CNtDbLLYSsBdKHS9Td13/dist=es2019,mode=types/typings.d.ts"
Reproduce using this gist
deno run https://gist.githubusercontent.com/sambs/d3c30151b9ed1cd3d308883148f88aec/raw/acffa68d532bd0df333c466671eb0565e3d85445/date-fns-deno.ts
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Using TypeScript | Manual - Deno
Using TypeScript. Deno supports both JavaScript and TypeScript as first class languages at runtime. This means it requires fully qualified module names, ...
Read more >How do I fix these typescript errors? - deno - Stack Overflow
As for how to resolve error , you can resolve it by giving it types as given in the interface , suppose if...
Read more >5 Changes Coming Soon to Deno - Fusebit
If the errors are variable-type data declarations, it will halt compilation until the errors are rectified. There are good arguments for ...
Read more >TypeError - JavaScript - MDN Web Docs
The TypeError object represents an error when an operation could not be ... (but not exclusively) when a value is not of the...
Read more >TypeScript for Deno: Any, Union Types, Custom Types, and ...
The clear problem is that the TypeScript compiler of any problem compiles to JavaScript even if we have typing errors as in line...
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 Free
Top 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
wanted to throw this out there, deno standard library includes its own datetime library now. Looks like it can handle most things https://deno.land/std@0.155.0/datetime/mod.ts
It seems the custom module https://deno.land/x/date_fns is not being updated. The related repository has been archived.
I tried using the latest verison of date-fns directly and it seemed to work without any problems:
So is there anything left to do here?