wechaty / grpc

gRPC Service & Protocol Buffers for Wechaty Puppet
https://wechaty.github.io/grpc/
Apache License 2.0
25 stars 22 forks source link

protoc-gen-ts error: TypeError: Cannot read property 'recognized' of undefined #115

Closed huan closed 3 years ago

huan commented 3 years ago
protoc -I ./third-party/ --proto_path=./proto//wechaty ./proto/wechaty/puppet.proto ./proto/wechaty/puppet/room_invitation.proto ./proto/wechaty/puppet/room_member.proto ./proto/wechaty/puppet/room.proto ./proto/wechaty/puppet/friendship.proto ./proto/wechaty/puppet/event.proto ./proto/wechaty/puppet/file_box.proto ./proto/wechaty/puppet/contact.proto ./proto/wechaty/puppet/tag.proto ./proto/wechaty/puppet/message.proto ./proto/wechaty/puppet/base.proto ./third-party/protoc-gen-openapiv2/options/annotations.proto ./third-party/protoc-gen-openapiv2/options/openapiv2.proto ./third-party/google/api/annotations.proto ./third-party/google/api/http.proto --plugin=protoc-gen-grpc=node_modules/grpc_tools_node_protoc_ts/bin/protoc-gen-ts --grpc_out=./generated/wechaty
protoc-gen-ts error: TypeError: Cannot read property 'recognized' of undefined
    at renderFields (/home/runner/work/grpc/grpc/node_modules/grpc_tools_node_protoc_ts/build/lib/template/partial/msg/MessageRender.js:39:34)
    at String.replace (<anonymous>)
    at MessageRender.render (/home/runner/work/grpc/grpc/node_modules/grpc_tools_node_protoc_ts/build/lib/template/partial/msg/MessageRender.js:35:14)
    at MsgRender.renderMessages (/home/runner/work/grpc/grpc/node_modules/grpc_tools_node_protoc_ts/build/lib/template/MsgRender.js:44:68)
    at MsgRender.render (/home/runner/work/grpc/grpc/node_modules/grpc_tools_node_protoc_ts/build/lib/template/MsgRender.js:26:41)
    at /home/runner/work/grpc/grpc/node_modules/grpc_tools_node_protoc_ts/build/index.js:39:83
    at Array.forEach (<anonymous>)
    at /home/runner/work/grpc/grpc/node_modules/grpc_tools_node_protoc_ts/build/index.js:29:48
    at Socket.<anonymous> (/home/runner/work/grpc/grpc/node_modules/grpc_tools_node_protoc_ts/build/lib/Utility.js:70:13)
    at Socket.emit (events.js:326:22)

--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
huan commented 3 years ago

Interesting... this issue disappeared without any reason.

Maybe it's related to some dependency NPM module broken for a while?