mwitkow/go-proto-validators

How to build this for NodeJS?

nebiros opened this issue · 0 comments

This is the command I'm using:

protoc \
        -I . \
        -I /Users/nebiros/go/src \
        -I `go list -m -f "{{.Dir}}" github.com/golang/protobuf` \
        -I `go list -m -f "{{.Dir}}" google.golang.org/protobuf` \
        -I `go list -m -f "{{.Dir}}" github.com/mwitkow/go-proto-validators` \
        --go_out ./gen/go \
        --go_opt paths=source_relative \
        --go-grpc_out ./gen/go \
        --go-grpc_opt paths=source_relative \
        --govalidators_out ./gen/go \
        --govalidators_opt paths=source_relative \
        --grpc-gateway_out ./gen/go \
        --grpc-gateway_opt logtostderr=true \
        --grpc-gateway_opt paths=source_relative \
        --grpc-gateway_opt generate_unbound_methods=true \
        --openapiv2_out ./gen/go \
        --openapiv2_opt logtostderr=true \
        --openapiv2_opt generate_unbound_methods=true \
        --js_out import_style=commonjs,binary,annotate_code,namespace_prefix=challenges:./gen/js \
        --plugin protoc-gen-grpc-node=./node_modules/grpc-tools/bin/protoc_plugin.js \
        --grpc-node_out ./gen/js \
        *.proto

But building the NodeJS side throws me an error: Error: Cannot find module './validator_pb.js'. The file doesn't exist. There's a way to build go-proto-validators for NodeJS? or at least ignore it?