ozer
ozer

Reputation: 241

Ionic 4 Protocol Buffer

Hello I have Ionic project and need to use protocol buffer. However I could not find any resources or tutorials. I found this question on stackoverflow Protocol Buffers in Ionic

Also I follow this https://golb.hplar.ch/2017/01/Consume-Protocol-Buffer-messages-in-Ionic-2.html.

However it gives an error.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] pbts: `pbjs -t static-module ../server/src/main/protobuf/Earthquake.proto -o src/app/protos/earthquake.js && pbts --no-comments src/app/protos/earthquake.js -o src/app/protos/earthquake.d.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] pbts script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ozer0\AppData\Roaming\npm-cache\_logs\2020-03-28T18_46_04_909Z-debug.log

Here is the error.

Is there any resources for the protocol buffer for ionic 4. Thank you very much.

Upvotes: 1

Views: 133

Answers (1)

GhostDede
GhostDede

Reputation: 446

https://golb.hplar.ch/2017/01/Consume-Protocol-Buffer-messages-in-Ionic-2.html This tutorail I guess indicates all of the important point.

../server/src/main/protobuf/Earthquake.proto

Check the location whether Earthquake.proto is in this path. If you fix it, it will work.

Upvotes: 1

Related Questions