pubkey / rxdb

A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/
https://rxdb.info/
Apache License 2.0
21k stars 1.02k forks source link

Angular 2 cli build not able to integrate #64

Closed arafays closed 7 years ago

arafays commented 7 years ago

So I have been trying to make the build work for the past 5 days I have spent more than 30 hours trying to figure what I am doing wrong there seems to be Nothing that works for I have the lastest Node and NPM installed. The example of angular2 does not work the preinstall command seems to go on and on downloading same packages over and over again.

I started a new project with ng new command I installed rxdb then made a service following the example of rxdb but I am getting this error in visual studio code webpack is failing to compile with the same error

ERROR in ./src/app/services/database.service.ts (28,62): Argument of type 'Promise<vo id>' is not assignable to parameter of type 'Promise<any>'. Property '[Symbol.toStringTag]' is missing in type 'Promise<void>'.)

if someone is able to make a git repo with the angular cli project and make this work using

npm install rxdb

that would be much helpful

pubkey commented 7 years ago

Which OS? Which Nodejs-version?

pubkey commented 7 years ago

Have you installed typescript globaly?

arafays commented 7 years ago

@pubkey node v6.10.0 on windows 10 the typescript is install globally I have tried uninstalling and reinstalling the same version of typescript used in the example that too doesn't work my typescript version now 2.2.1

image here https://i.stack.imgur.com/50vu6.png

in my devdependencies

"ts-node": "~2.0.0", "tslint": "4.0.2", "typescript": "~2.0.10"

pubkey commented 7 years ago

I'm sorry. I couldn't figure out where exactly the problem is. I am also not able to do a build on the current example. I think the problem lies in the typings of rxjs and Observable.fromPromise.

In version 3.0.0 I refactored the whole ng2-example, where the 'unclean' fromPromise is not used. See here

arafays commented 7 years ago

ill leave it at that and say that I am really looking forward for the ver 3 to come out