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

meteor 1.8 - angular #96

Open
JanvanCasteren opened this issue Dec 7, 2018 · 10 comments
Open

meteor 1.8 - angular #96

JanvanCasteren opened this issue Dec 7, 2018 · 10 comments

Comments

@JanvanCasteren
Copy link

should meteor-client-bundler work with meteor 1.8? I use it in an angular frontend and it doesn't work anymore since upgrading meteor from 1.6 to 1.8.

@georgyberdyshev
Copy link

Hello @JanvanCasteren,

meteor-client-bundler does not work yet with Meteor 1.8.
As a workaround, please follow the steps in:
Urigo/angular-meteor#1957 (comment)

Georgy

@kombadzomba
Copy link

kombadzomba commented Feb 21, 2019

We have Meteor 1.8.2, using meteor-client-bundler 0.6.0 with client parameter "release": "1.7.0.5" as stated in the workaround. However, we experience occasional node process crashes with following error:

TypeError: Cannot set property 'setWebsocketTimeout' of null
    at Server.<anonymous> (packages/ddp-server/stream_server.js:99:5)
    at emitOne (events.js:116:13)
    at Server.emit (events.js:211:7)
    at App.emit (c:\demo.app\prod\meteor\bundle\programs\server\npm\node_modules\meteor\ddp-server\node_modules\sockjs\lib\sockjs.js:196:29)
    at c:\demo.app\prod\meteor\bundle\programs\server\npm\node_modules\meteor\ddp-server\node_modules\sockjs\lib\transport.js:111:25
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

Could this be related to meteor-client-bundle version mismatch?

@kombadzomba
Copy link

@ardatan @Urigo is this package dead or what?

@Slavrix
Copy link

Slavrix commented Aug 10, 2019

@ardatan id love to assist with getting this package updated, but i dont know where to start.

@JanvanCasteren
Copy link
Author

I have a working project with angular cli 7.3.9 version and meteor 1.8.1 version which uses meteor-client-bundler.

It took me quite some time to get around all typescript errors but eventually I got it working. I planned to extract a starter project from it to share on github, but didn't find time yet.

If anyone needs help to achieve a setup with angular 7 and meteor 1.8, please contact me, so I can see if I can help

@georgyberdyshev
Copy link

Let's team up @JanvanCasteren and @Urigo

@SergijeRaz
Copy link

Hi @JanvanCasteren . I am having the same problem as @kombadzomba . We are using Meteor version 1.8.0.2, angular cli version 7.2.3 and meteor-client-bundler version 0.6.0. Do you think that you have fixed our problem aswell with the changes you made?

@JanvanCasteren
Copy link
Author

I have three meteor-related imports in my angular main.ts:

import './meteor-client.production';   // meteor client bundle
import { Meteor } from 'meteor/meteor';  // meteor itself, only import it here, and not in any other file!
import 'angular2-meteor-polyfills';

my meteor version is 1.8.1

It is important to only import Meteor in main angular file. Don't import it in any of the files of your Meteor folder, because you will have tslint complaining about double declarations.

Versions of the relevant client side packages are

    "@angular/core": "~7.2.0",
    "angular2-meteor-polyfills": "^0.2.0",
    "meteor-client-bundler": "^0.6.0",
    "meteor-node-stubs": "^0.4.1",
    "meteor-rxjs": "0.4.14",  // fixed!
    "rxjs": "~6.3.3",

Could the above information be helpful to you?

The combination of Meteor with Angular works very well for me and I do plan to put a starter project on github with my setup. I don't have time for it this week, but I will do it soon.

@SergijeRaz
Copy link

Hi @JanvanCasteren . Thank you for the quick response. I will try these fixes and let you know if they work. I would also be very thankful if you created a starter project at some point.

@JanvanCasteren
Copy link
Author

Hi @SergijeRaz

I uploaded a starter project to Github: https://github.com/JanvanCasteren/meteor-angular-starter

I am also working on a more elobarate demo, which also inegrates the Meteor accounts system in Angular: https://github.com/JanvanCasteren/meteor-angular-demo . This demo is still work-in-progress, but you can take a look at it to see how I do things. Any comments are appreciated.

I have to do a little more polishing and after that I will put a post about the two repositories on the Meteor forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants