-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 'remove' of null #1165
Labels
Comments
Greetings! Can you share the proto files you're using to get this? |
I came into same error, and I uploaded the proto file I use. pbjs --sparse -p "$GOPATH/src/github.com/gogo/protobuf" -p . -t json test.proto Proto Files: Thanks! |
+1 |
The minimum code to reproduce the error: syntax = "proto3";
package stmp.examples.gomoku;
option go_package = "github.com/acrazing/stmp-go/examples/gomoku/gomoku_pb;pb";
import "github.com/envoyproxy/protoc-gen-validate/validate/validate.proto";
//import "stmp/stmp.proto";
// disable this for avoid pbjs throws error
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.description_all) = false;
option (gogoproto.goproto_unrecognized_all) = false;
option (gogoproto.goproto_extensions_map_all) = false;
option (gogoproto.goproto_unkeyed_all) = false;
option (gogoproto.goproto_sizecache_all) = false;
message Empty {
} execute: yarn pbjs -t static-module -w commonjs -p ./vendor -p . \
--no-create --no-verify \
--no-convert --no-delimited --keep-case --sparse \
-o ./examples/gomoku/gomoku_pb/gomoku.pb.js ./examples/gomoku/gomoku_pb/*.proto |
Still happening with version 6.10.1 |
For me adding the following was enough to resolve the issue: if (object.extensionField.parent !== null) {
object.extensionField.parent.remove(object.extensionField);
} No idea if that's good enough to open a merge request with though. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
protobuf.js version: 6.8.3
When using
--sparse
option in thepbjs
CLI command. It fails with an errorTypeError: Cannot read property 'remove' of null
The text was updated successfully, but these errors were encountered: