TypeError: Cannot read property 'MethodInfo' of undefined with webpack 5
See original GitHub issueHai,
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:
- Created 2 years ago
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 versionprotoc-gen-grpc-web
with the new one and set it on windows path.Thank You for help
@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 😃)