Skip to content

Upgrade google-protobuf dependency version to 3.8.0+ #80

Closed
@lhr0909

Description

@lhr0909

We have encountered an issue with the generated grpc files in the 2.0.1 npm lib where it is using features that only exist in [email protected]+.

https://github.com/dgraph-io/dgraph-js/blob/master/generated/api_pb.js#L368

when we were trying to run with the lower version it we get yelled at for the below error:

(node:86170) UnhandledPromiseRejectionWarning: TypeError: jspb.Message.getBooleanFieldWithDefault is not a function
    at Function.proto.api.Operation.toObject (/Users/simon/Documents/git-repo/treelab-api/node_modules/dgraph-js/generated/api_pb.js:1424:27)
    at proto.api.Operation.toObject (/Users/simon/Documents/git-repo/treelab-api/node_modules/dgraph-js/generated/api_pb.js:1406:30)
    at Object.stringifyMessage (/Users/simon/Documents/git-repo/treelab-api/node_modules/dgraph-js/lib/util.js:52:31)
    at DgraphClient.<anonymous> (/Users/simon/Documents/git-repo/treelab-api/node_modules/dgraph-js/lib/client.js:62:64)
    at step (/Users/simon/Documents/git-repo/treelab-api/node_modules/dgraph-js/lib/client.js:32:23)
    at Object.next (/Users/simon/Documents/git-repo/treelab-api/node_modules/dgraph-js/lib/client.js:13:53)
    at /Users/simon/Documents/git-repo/treelab-api/node_modules/dgraph-js/lib/client.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/simon/Documents/git-repo/treelab-api/node_modules/dgraph-js/lib/client.js:3:12)
    at DgraphClient.alter (/Users/simon/Documents/git-repo/treelab-api/node_modules/dgraph-js/lib/client.js:56:16)
(node:86170) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:86170) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit **code.**

After installing [email protected] it fixes the issue.

Relevent Issue at google-protobuf - protocolbuffers/protobuf#6057

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions