Instead of:
const common = protobufjs.loadSync('common.proto'); const ecommerce = protobufjs.loadSync('ecommerce.proto'); const hr = protobufjs.loadSync('hr.proto');
One solution:
const common = protobufjs.loadSync('common.proto'); protobufjs.loadSync('ecommerce.proto', common); protobufjs.loadSync('hr.proto', common);
Another solution:
const root = protobufjs.loadSync([ 'common.proto', 'ecommerce.proto', 'hr.proto' ]);
Happy Coding!
No comments:
Post a Comment