google-cloud-node: Latest pubsub version breaks dependencies with grpc (doesn't use common-grpc package)
Environment details
- OS: Linux
- Node.js version: 8.7.0
- npm version: 5.4.2
- google-cloud-node version:
Steps to reproduce
Try use the latest versions of @google-cloud/datastore
and @google-cloud/pubsub
together.
Because the latest version of @google-cloud/pubsub
includes grpc as a direct dependency instead of using the package which seems to have been created for linking grpc together between libraries (@google-cloud/common-grpc
), the versions of GRPC are clashing and causing problems such as #2667
To get my project working I had to revert to @google-cloud/pubsub:0.14.2
It appears to have been changed during this commit: #2627
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 24 (16 by maintainers)
@Amit-A our latest release contains a couple of breaking changes, one of which was the removal of the
publisher()
method. Now to publish messages you just need to callpublish()
I apologize for any inconveniences this may have caused.
@stephenplusplus So, through a lot of trial and error, trying every
yarn
command known to man and failing, and eventually having to just modify theyarn.lock
file directory directly, I eventually got my project to seegrpc:1.7.1
as a root dependency and PubSub loads up without that error now.But I am seeing a new strange error popping up:
Which I’ve tracked to this line of code in
grpc-node
: https://github.com/grpc/grpc-node/blob/2b538ca0217638b3f0f45158b53eb9cd912381fb/packages/grpc-native-core/src/client.js#L805This happens after setting up and adding listeners to PubSub.
The listeners are working however and everything seems fine otherwise… So going to roll with it for now. Could be the client not initialising properly the first time, but seems to start up anyway after that.