Open
Description
protobuf.js version: 6.8
I have been using protobuf.js to generate json-module with reflection information, it's been working fine until 6.7.3 and a recent upgrade to 6.8 is throwing errors.
For example I use the following command to generate json-module:
pbjs --target json-module -w commonjs --keep-case -o dest.js source.proto
The errors:
$ mocha test/protobuf.spec.js
/Users/xxx/xxx/node_modules/xxx/xxxx/dest.js:6
var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $protobuf.Root()))
^
TypeError: $protobuf.Root is not a constructor
at Object.<anonymous> (/Users/xxx/xxx/node_modules/xxx/xxxx/dest.js:6:74)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
Thanks!!