How to resolve webpack issue with pubsub client library

194 views
Skip to first unread message

Anuj Sharma

unread,
Jan 21, 2022, 3:15:04 AM1/21/22
to pubsub-discuss
Hi Team,
I started using pubsub client library in my codebase which was already configured with webpack, but i am getting the following error : 

pull-retry.js:24 Uncaught TypeError: Cannot read properties of undefined (reading 'status') at Object../node_modules/@google-cloud/pubsub/build/src/pull-retry.js

i tried finding the solution on SOF, but it just saying that library is not supported with webpack, I am just starting out so any help would be appreciated.

Thanks.

Kir Titievsky

unread,
Jan 21, 2022, 10:29:51 AM1/21/22
to Anuj Sharma, pubsub-discuss

Anuj, could you share a code snippet, including your how you grab the client library dependency?

--
You received this message because you are subscribed to the Google Groups "pubsub-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/88378717-ad11-40d2-96e8-0887b504ea28n%40googlegroups.com.


--
Kir Titievsky | Product Manager | Google Cloud Pub/Sub 

Anuj Sharma

unread,
Jan 21, 2022, 2:28:37 PM1/21/22
to pubsub-discuss
Hi kir, thanks for the response. I have added the dependency in package.json and simply importing the Pubsub gives me the above error.

import {PubSub} from '@google-cloud/pubsub'

Thanks.

tielve

unread,
Jan 26, 2022, 9:46:10 AM1/26/22
to pubsub-discuss
Hello,

Thanks for the feedback.

However, as Google Groups are reserved for general product discussion, and this issue (receiving an error message by simply trying to import the library) seem very much related to some conflict with the library, I would recommend you to raise an issue directly on the Github repository in order to be in touch with the team supporting the code.

Best regards,

Reply all
Reply to author
Forward
0 new messages