-
Notifications
You must be signed in to change notification settings - Fork 182
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
Property 'startWith' does not exist on type 'ObservableCursor<Message>'. #184
Comments
In the following method, mergeMap is not found within ObservableCursor. Has it been removed ? ngOnInit() { |
If I add the 2 lines below directly at the beginning of ngOnInit(), it will work: However if I use the imports: "Chats" and "Messages" from "api/server/collections", it won't work! |
Just tried to complete the tutorial too and just completed chapter 8. If you install all packages now you actually use typescript 2.6, angular 5 and rxjs 5.5 and that seems to be the major problem. First you need to pipe all operators and change the imports to lettabale operators, like mentioned here: https://medium.com/coding-snippets/rxjs-5-5-property-map-does-not-exist-on-type-observable-e825129c2068 Also you have to change the composite publication of chats on meteor side: After this you still get errors like: Type 'Observable<Chat[]>' is not assignable to type 'Observable<Chat[]>'. This generally means you have two copies of RxJs installed, like mentioned here: In our special case we do not really have 2 versions of RxJs installed, but typescript 2.4.2+ detects the symlink of the node_modules dir in the api dir (= meteor server) as a second version. To fix this just completely seperate client & server:
Things should work out again ;-) |
@poparotsy I got the same error a few days ago when i deleted the node_modules dir in the ionic project and reinstalled all npm packages (with npm install). This means one or more new package versions create this error. I guess it is a typescript version, which is 2.7+. I use typescript 2.6.2. i attached my package-lock.json file. Maybe it helps you. Actually i also get some errors when i create the meteor-client.js again with meteor-client-bundler. Didn't find out why these errors occour by now. |
@mikenetcode, regenerating node_modules didn't help, and typescript was 2.6 already!. `[01:15:18] typescript: src/pages/messages/messages.ts, line: 67
[01:15:18] typescript: src/pages/messages/messages.ts, line: 214
[01:15:18] typescript: src/pages/messages/messages.ts, line: 224
[01:15:18] typescript: src/pages/messages/messages.ts, line: 258
[01:15:18] typescript: src/services/phone.ts, line: 54
` |
@poparotsy When you clone the original project just look at the package.json in detail. Not all versions are fixed, like angular and rxjs. In case of typescript ("typescript": "^2.4.2") always the latest version of major release 2 is installed. Actually this would be 2.8.3 (npm show typescript version). Just check the versions directly in node_modules dir (e.g.: node_modules/typescript/package.json). Did you completely seperate meteor server (api dir) and the ionic project? |
@mikenetcode , Ionic2CLI-Meteor-WhatsApp, typescript was 2.4.2 && angular 4.4.3, The problem was with the latest meteor-rxjs v 0.4.11, |
@poparotsy Good to know. Thanks for the info. |
Whenever I launch "ionic serve", I get error below.
I've just completed chapter 4 in the guide:
https://angular-meteor.com/tutorials/whatsapp2/ionic/meteor-server-side
Here is the complete stacktrace. What am I doing wrong?
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729
--dev-logger-port 53703 --nobrowser - Ctrl+C to cancel
[16:28:07] watch started ...
[16:28:07] build dev started ...
[16:28:07] clean started ...
[16:28:07] clean finished in 1 ms
[16:28:07] copy started ...
[16:28:07] deeplinks started ...
[16:28:07] deeplinks finished in 78 ms
[16:28:07] transpile started ...
[16:28:13] typescript: src/pages/chats/chats.ts, line: 18
Property 'mergeMap' does not exist on type 'ObservableCursor'.
[16:28:13] typescript: src/pages/chats/chats.ts, line: 23
Property 'startWith' does not exist on type 'ObservableCursor'.
[16:28:13] dev server running: http://localhost:8100/
[OK] Development server running!
Local: http://localhost:8100
External: http://10.0.2.15:8100
DevApp: whatsapp@8100 on debian
The text was updated successfully, but these errors were encountered: