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

TypeError: Cannot read property 'MethodInfo' of undefined with webpack 5 #1151

Closed
bram-abe opened this issue Oct 18, 2021 · 5 comments
Closed

Comments

@bram-abe
Copy link

bram-abe commented Oct 18, 2021

Hai,

I'am using protoc to compile .proto to commonjs and works fine.

the problem happen when I'm using webpack 5 with error like this:

TypeError: Cannot read property 'MethodInfo' of undefined

the error refer to auth_grpc_web_pb.js .

How to solve this problem ?
Please advice, thank you

UPDATE:

I fallback to grpc-web v1.2.1 and the error was gone.

but I still dont know why this is happen to grpc-web v1.3.0

@TaroSunn
Copy link

because v1.3.0 Removed AbstractClientBase.MethodInfo
#1139

@bram-abe
Copy link
Author

bram-abe commented Oct 19, 2021 via email

@sampajano
Copy link
Collaborator

sampajano commented Oct 20, 2021

@bram-abe Thanks for the report! 😃

I suspect the issue is likely because you're using an old version of protoc-gen-grpc-web. Could you try installing the latest version (1.3.0) following this instruction, and see if the issue goes away?

(btw i'm curious how are you typically getting your protoc-gen-grpc-web and whether we can make it easier for you to get the latest version :))

@bram-abe
Copy link
Author

@bram-abe Thanks for the report! 😃

I suspect the issue is likely because you're using an old version of protoc-gen-grpc-web. Could you try installing the latest version (1.3.0) following this instruction, and see if the issue goes away?

(btw i'm curious how are you typically getting your protoc-gen-grpc-web and whether we can make it easier for you to get the latest version :))

aah you're right the protoc-gen-grpc-web still an old version, now the issues are gone after reinstalling. Somehow I'am missing on the middle of update all deps. process and miss to overwrite the old version protoc-gen-grpc-web with the new one and set it on windows path.

Thank You for help

@sampajano
Copy link
Collaborator

yw! Great to hear the issue is resolved! 😃

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

No branches or pull requests

3 participants