Skip to content

Uncaught TypeError: Cannot read property 'emptyArray' of undefined #1503

@ZiyunHe

Description

@ZiyunHe

protobuf.js version: 6.10.1

Im using typescript and trying with awesomemessage example. It reports error of emptyArray.
import protobuf from 'protobufjs';
protobuf.load("t.proto", function(err, root) {
...
})
Anyone has idea? Thanks

types.defaults = bake([
    /* double   */ 0,
    /* float    */ 0,
    /* int32    */ 0,
    /* uint32   */ 0,
    /* sint32   */ 0,
    /* fixed32  */ 0,
    /* sfixed32 */ 0,
    /* int64    */ 0,
    /* uint64   */ 0,
    /* sint64   */ 0,
    /* fixed64  */ 0,
    /* sfixed64 */ 0,
    /* bool     */ false,
    /* string   */ "",
    /* bytes    */ util_1.emptyArray, <------Uncaught TypeError: Cannot read property 'emptyArray' of undefined
    /* message  */ null
]);

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