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

error TS2694: Namespace 'Deno' has no exported member 'ReadResult'. #529

Closed
irustm opened this issue Jul 7, 2019 · 5 comments
Closed

error TS2694: Namespace 'Deno' has no exported member 'ReadResult'. #529

irustm opened this issue Jul 7, 2019 · 5 comments

Comments

@irustm
Copy link
Contributor

irustm commented Jul 7, 2019

deno version
deno: 0.11.0
v8: 7.7.37
typescript: 3.5.1

https://deno.land/[email protected]

error TS2694: Namespace 'Deno' has no exported member 'ReadResult'.

► https://deno.land/std/io/bufio.ts:7:24

7 type ReadResult = Deno.ReadResult;
                         ~~~~~~~~~~

error TS2339: Property 'nread' does not exist on type 'number'.

► https://deno.land/std/io/bufio.ts:134:19

134         assert(rr.nread >= 0, "negative read");

cc: deno/2591
denoland/deno#2591

@irustm
Copy link
Contributor Author

irustm commented Jul 7, 2019

@kt3k ?

@irustm
Copy link
Contributor Author

irustm commented Jul 7, 2019

aa.. waiting this PR: #527

@irustm irustm closed this as completed Jul 7, 2019
@rodrigooler
Copy link

I have the same problem

Captura de tela de 2019-09-03 23-06-05

Server.ts

import { Server } from "https://github.com/fen-land/deno-fen/raw/master//server.ts";
import { Router } from "https://github.com/fen-land/deno-fen/raw/master//tool/router.ts";

const s = new Server();

s.port = 1882;

s.logger.changeLevel("ALL");

let mergeRouter = new Router("merge");

mergeRouter
  .get(
    "/",
    async context =>
      (context.body = `${context.data.get("router").name} in ${
        context.data.get("router").route
      }`)
  )
  .post(
    "/",
    async context =>
      (context.body = `POST ${context.data.get("router").name} in ${
        context.data.get("router").route
      }`)
  )
  .get(
    "me",
    async context =>
      (context.body = `${context.data.get("router").name} in ${
        context.data.get("router").route
      }`)
  );

let router = new Router();

router
  .get("/:id", async context => {
    context.body = `we have ${JSON.stringify(
      context.data.get("router").params
    )} in ${context.data.get("router").route}`;
  })
  .get("/:id/:name", async context => {
    context.body = `we have ${JSON.stringify(
      context.data.get("router").params
    )} in ${context.data.get("router").route}`;
  })
  .get("/hello/:name", async context => {
    context.body = `hello ${context.data.get("router").params.name} in ${
      context.data.get("router").route
    }`;
  })
  .use({
    "/use": {
      get: async context =>
        (context.body = `use in ${context.data.get("router").route}`)
    }
  })
  .merge("/merge", mergeRouter);
  
s.setController(router.controller);

s.start();

@kt3k
Copy link
Member

kt3k commented Sep 4, 2019

@rodrigooler
The framework, deno-fen, seems depending on too old version of Deno, and not maintained well. You need to choose one of the other frameworks.

@rodrigooler
Copy link

@kt3k yes, I'm taking a look at ABC now. I realized about the downgrading and decided to look into the modules that are listed on the deno website. Thank you for the tips!

inverted-capital pushed a commit to dreamcatcher-tech/napps that referenced this issue Oct 24, 2024
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

3 participants