onlinecode

How to fix the Property ‘utime’ does not exist on type ‘typeof Deno’ Error

How to fix the Property ‘utime’ does not exist on type ‘typeof Deno’ Error

In this post we will give you information about How to fix the Property ‘utime’ does not exist on type ‘typeof Deno’ Error. Hear we will give you detail about How to fix the Property ‘utime’ does not exist on type ‘typeof Deno’ ErrorAnd how to use it also give you demo for it if it is necessary.

Learn, how to solve the Deno Property ‘utime’ does not exist on type ‘typeof Deno’ error.

When we use a deno standard modules that are not stable yet, we will get the following errors in our terminal.

Example program:

app.js
import { writeJsonSync } from "https://deno.land/std/fs/mod.ts";writeJsonSync(  "./users.json",  { name: "john", age: "22" },);

Error:

➜  deno run --allow-write=./users.json  app.jserror: 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:16TS2339 [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:10TS2339 [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:16TS2339 [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:16TS2339 [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:16TS2339 [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:10TS2339 [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:10TS2339 [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:10TS2339 [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:16TS2339 [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:10TS2339 [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:14TS2339 [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:8TS2339 [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:16TS2339 [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:16TS2339 [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:10TS2339 [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:10Found 16 errors.

To fix this error, we need to enable unstable modules during the runtime by using the –unstable flag.

deno run --unstable --allow-write=./users.json app.js

Hope this code and post will helped you for implement How to fix the Property ‘utime’ does not exist on type ‘typeof Deno’ Error. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Exit mobile version