question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
bram-abecommented, Oct 25, 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 😃)

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

1reaction
sampajanocommented, 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 😃)

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - TypeError: Cannot read properties of undefined ...
javascript - TypeError: Cannot read properties of undefined (reading 'MethodInfo') in react js app using grpc-web - Stack Overflow. Stack ...
Read more >
Cannot read properties of undefined (reading ... - GitHub
When using hot module replacement in Webpack 5.66.0, an error is produced "Cannot read properties of undefined (reading ...
Read more >
Cannot read properties of undefined-Reactjs
Coding example for the question cause of TypeError: Cannot read properties of undefined-Reactjs.
Read more >
error typeerror: cannot read properties of undefined ... - You.com
Here's an example of a JavaScript TypeError: Cannot read property of undefined thrown when a property is attempted to be read on an...
Read more >
Cannot read properties of undefined (reading 'MethodInfo')_莫 ...
调用proto文件所生成的js文件来初始化客户端时报这个错TypeError: Cannot read properties of undefined (reading 'MethodInfo')出现这个问题的原因是 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found