-
Notifications
You must be signed in to change notification settings - Fork 82
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
Enable TS Strict mode and fix linting errors #63
Conversation
I checked out this pull request to test your work, but unfortunately, I have some problems building. Did you encountered something like this?
|
I didn't have such problems. Do you have them on all three pull request or only on this one? I also tried it on my windows machine and it worked there too. Did you run a fresh npm install with deleting node_modules and package-lock.json? I often have some problems which are only related to corrupt npm installations. |
For the error: I will now investigate and try to reproduce on my machine. I think it is also a good idea to merge this one first: #61. There i didn't make so much changes, only the one which were needed for rxjs and angular v6. Maybe the error don't show up there. (The changes i described in 1. and 2. are also only there for now, i didn't had time to rebase this PR yet). |
I think i found the reason for the error: The angular cli v6 no longer provides a shim for process but mqtt.js relies on this: https://github.com/mqttjs/MQTT.js/blob/master/lib/store.js#L76 So the best for now should be to add a new step to guide to let consumers know that they need to include a node shim to their builds and probably file an issue at mqtt.js. I'm now trying to get ngx-mqtt working with a shim. |
I got it working again (but the solution is really dirty):
to
I also filed mqttjs/MQTT.js#804. |
Oh that's sad. I'm really amazed by your PR. Let's hope someone on mqtt.js is answering soon and this issue can be solved in a smart way. |
Many many thanks for your great effort! @chrste90! This PR is now in large parts superseded. |
TSLint was complaining about shadowed variable filter in mqtt.service.
Instead of renaming all instances of filter, i just renamed the filter operator of from rxjs import.
I also enabled linting on travis.
Based on #61, so only the second commit is important.