-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property 'utime' does not exist on type 'typeof Deno' #5175
Comments
These features are now under the |
You're right, it works with the |
It is hard to detect, in TypeScript, that you are trying to access an API that is considered unstable... they simply don't exist, though obviously the TypeScript errors are confusing. @lucacasonato @ry I think people are going to keep getting tripped up by this. I wonder if when running without the |
@kitsonk While having to keep a list in the compiler is not great, it would be the best end user experience, so I think it's a good idea. |
Please update README to specify |
It is not ideal that some modules in std require --unstable (especially mod.ts files). Perhaps it makes sense to separate/group path/mod.ts and path/unstable.ts? At the moment if I want to use path.join, I'm out of luck, even though it doesn't - as far as I can tell - itself use an unstable api. That doesn't really make sense. |
For now I'm resorting to importing files directly like |
Ran into the same issue today. Using However I would also opt to using specific imports for now so that users do not have to use the |
After running with the
It seems like a really bad use experience to have Deno in v1.0.0 and still have part of the std under an unstable flag and getting errors even with that flag. I'm not trying to be mean but it's a critical time for Deno to make a good impression on users. |
@Driky Lock your imports to a specific version rather than implicitly relying on the master branch. |
@lucacasonato thank you for the tips. Importing like this:
get me the following:
any specific tag someone would recommend I target ? |
@Driky I believe you need to specify the standard library's version like this: import {
existsSync,
readJsonSync,
} from "https://deno.land/std@0.51.0/fs/mod.ts"; |
#5630 <- there was a similar issue. I think there are two main culprits here:
|
@mickaelvieira thank you I'll test that |
What if we made the missing I had an idea on how to implement that, link here... I might have posted it in the wrong place though. Basically what it would do is throw an error if you try to use an unstable API without the unstable flag. What's nice about it is that you don't need to maintain a list of unstable API names, and it also doesn't require trapping the diagnostic messages and doing a string search and replace |
Better docs were added in #5456 |
I'm trying the following script and I get a few errors.
index.ts
Error:
deno 1.0.0-rc1
v8 8.2.308
typescript 3.8.3
The text was updated successfully, but these errors were encountered: