sholladay / pogo

Server framework for Deno

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Deno 0.3.x

nilsnh opened this issue · comments

Hi there. Thanks for creating this framework. :)

I tried to run the example :

import pogo from 'https://deno.land/x/pogo/main.js';

const app = pogo.server({ port : 3000 });

app.route({
    method : 'GET',
    path   : '/hello',
    handler() {
        return 'Hello, world!';
    }
});

app.start();

But I ran into this error.

> $ deno server.ts                                                                                                                             [±master ●]
Compiling file:///Users/nilsnh/deno-testing/server.ts
Downloading https://deno.land/x/pogo/main.js
Downloading https://raw.githubusercontent.com/sholladay/pogo/master/dependencies.js
Downloading https://raw.githubusercontent.com/sholladay/pogo/master/lib/respond.js
Downloading https://raw.githubusercontent.com/sholladay/pogo/master/lib/toolkit.js
Downloading https://deno.land/x/http@61a3911be7e01273e13bf35a3a16285f413f0b70/http_status.ts
Downloading https://deno.land/x/http@61a3911be7e01273e13bf35a3a16285f413f0b70/mod.ts
Compiling https://raw.githubusercontent.com/denoland/deno_std/61a3911be7e01273e13bf35a3a16285f413f0b70/http/mod.ts
Downloading https://raw.githubusercontent.com/denoland/deno_std/61a3911be7e01273e13bf35a3a16285f413f0b70/http/http.ts
Downloading https://raw.githubusercontent.com/denoland/deno_std/61a3911be7e01273e13bf35a3a16285f413f0b70/http/deno
Uncaught Other: Import 'https://raw.githubusercontent.com/denoland/deno_std/61a3911be7e01273e13bf35a3a16285f413f0b70/http/deno' failed: 404 Not Found
    at DenoError (js/errors.ts:22:5)
    at maybeError (js/errors.ts:33:12)
    at maybeThrowError (js/errors.ts:39:15)
    at sendSync (js/dispatch.ts:86:5)
    at fetchModuleMetaData (js/os.ts:73:19)
    at _resolveModule (js/compiler.ts:255:38)
    at resolveModuleNames (js/compiler.ts:486:35)
    at compilerHost.resolveModuleNames (third_party/node_modules/typescript/lib/typescript.js:121106:138)
    at resolveModuleNamesWorker (third_party/node_modules/typescript/lib/typescript.js:88311:127)
    at resolveModuleNamesReusingOldState (third_party/node_modules/typescript/lib/typescript.js:88553:24)

My versions. I'm on MacOS Mojave 10.14.4.

> $ deno --version                                                                                                                                  [±master ●]
deno: 0.3.7
v8: 7.4.238
typescript: 3.4.1

Hi there. Deno's HTTP API has been evolving rapidly and I haven't yet updated the code here to support Deno 0.3.x. As you may have noticed, Travis CI passed using Deno 0.2.3. So you can either use that older version of Deno, help update the code here, or wait for me to update it.

I expect this to be less than an hour's worth of work.

Thanks for the high quality bug report!

Thanks for the quick reply. I just forked this project and will try to update the dependencies. Will report back if I complete that or give up. 😅

You probably got at notification about this, but just to make sure. I just submitted this pull request #2 😄