Skip to content
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

Multiple errors while using FS example from STD docs. #5724

Closed
jeemspace opened this issue May 21, 2020 · 4 comments
Closed

Multiple errors while using FS example from STD docs. #5724

jeemspace opened this issue May 21, 2020 · 4 comments

Comments

@jeemspace
Copy link

C:\Coding3\deno>deno run test/test.js
Compile https://deno.land/std/fs/mod.ts
error: TS2339 [ERROR]: Property 'utime' does not exist on type 'typeof Deno'.
    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(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'.
    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'.
    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'.
    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(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(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(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'.
    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(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'.
  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(src, dest);
       ~~~~~~~~
    at https://deno.land/std/fs/ensure_link.ts:52:8

TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'.
    await Deno.symlink(src, dest, {
               ~~~~~~~
    at https://deno.land/std/fs/ensure_symlink.ts:33:16

TS2339 [ERROR]: Property 'symlink' does not exist on type 'typeof Deno'.
    await Deno.symlink(src, dest);
               ~~~~~~~
    at https://deno.land/std/fs/ensure_symlink.ts:37:16

TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'.
    Deno.symlinkSync(src, dest, {
         ~~~~~~~~~~~
    at https://deno.land/std/fs/ensure_symlink.ts:65:10

TS2339 [ERROR]: Property 'symlinkSync' does not exist on type 'typeof Deno'.
    Deno.symlinkSync(src, dest);
         ~~~~~~~~~~~
    at https://deno.land/std/fs/ensure_symlink.ts:69:10

Found 16 errors.

Code used:

import { exists, existsSync } from "https://deno.land/std/fs/mod.ts";

exists("./foo"); // returns a Promise<boolean>
existsSync("./foo"); // returns boolean
@rafaelferres
Copy link

Add --unstable to Deno's run.

deno run --allow-all --unstable teste.ts

@kitsonk
Copy link
Contributor

kitsonk commented May 22, 2020

Duplicate of #5175

Please use the search functionality to avoid opening duplicate issues.

@jeemspace
Copy link
Author

jeemspace commented May 22, 2020

Add --unstable to Deno's run.

deno run --allow-all --unstable teste.ts

This does not change anything, it still has the same errors.

@rafaelferres
Copy link

rafaelferres commented May 22, 2020

What version of your Deno is it? Try using a 1.0.0 and import this version "https://deno.land/std@0.51.0/fs/mod.ts"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants