by Sai gowtham

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

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.js

error: 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:16

TS2339 [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:10

TS2339 [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:16

TS2339 [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:16

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:127:16

TS2339 [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:10

TS2339 [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:10

TS2339 [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:10

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, srcStatInfo.atime, srcStatInfo.mtime);
               ~~~~~
    at https://deno.land/std/fs/copy.ts:172:16

TS2339 [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:10

TS2339 [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:14

TS2339 [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:8

TS2339 [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:16

TS2339 [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:16

TS2339 [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:10

TS2339 [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:10

Found 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

Css Tutorials & Demos

How rotate an image continuously in CSS

In this demo, we are going to learn about how to rotate an image continuously using the css animations.

How to create a Instagram login Page

In this demo, i will show you how to create a instagram login page using html and css.

How to create a pulse animation in CSS

In this demo, i will show you how to create a pulse animation using css.

Creating a snowfall animation using css and JavaScript

In this demo, i will show you how to create a snow fall animation using css and JavaScript.

Top Udemy Courses

JavaScript - The Complete Guide 2022 (Beginner + Advanced)
JavaScript - The Complete Guide 2022 (Beginner + Advanced)
116,648 students enrolled
52 hours of video content
$14.99 FROM UDEMY
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
631,582 students enrolled
49 hours of video content
$24.99 FROM UDEMY
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
203,937 students enrolled
31.5 hours of video content
$14.99 FROM UDEMY