Skip to content

Davenport's use is ok in ES5 Browser when transpiled? #1

@bradws

Description

@bradws

Hi there,

I have this working in Node v6 (using the Async/Await, etc) just fine, however I'm getting a 'GET http://localhost:3000/davenport 404 (Not Found)' error and a 'ZoneAwareError' in Chrome browser (I'm using Angular 2.4). Is Davenport ok to work in the ES5 browser?

I'm using Typescript 2.1 and can confirm the normal Async/Await feature is working in the browser. However, whenever I put this getMessage function in a class:

...
import Client, { CouchDoc } from 'davenport';
import {Foo} from './Foo';
...

export class AppComponent {

    private async getMessage() {
      let s = 'Some random string';
      
      const client = new Client<Foo>('http://127.0.0.1:5984', 'hello-world');  // error when this line is here
      
      this.myStrToDisplay = s;
    }

}

Typescript builds just fine, but the errors appear in the browser when I put the const client = new Client<Foo>('http://127.0.0.1:5984', 'hello-world'); line in there.

It can't seem to find Davenport. Maybe, are you able to provide some example code at all?

Cheers,
bradws

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions