你好,我有离子项目,需要使用协议缓冲区。然而,我找不到任何资源或教程。我在stackoverflow Protocol Buffers in Ionic上发现了这个问题
我也关注这个https://golb.hplar.ch/2017/01/Consume-Protocol-Buffer-messages-in-Ionic-2.html。
但是,它会给出一个错误。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! proto-buff@0.0.1 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 proto-buff@0.0.1 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这就是错误。
ionic 4的protocol有没有资源。非常感谢。
发布于 2020-03-29 20:45:42
https://golb.hplar.ch/2017/01/Consume-Protocol-Buffer-messages-in-Ionic-2.html我猜这篇教程说明了所有的要点。
../server/src/main/protobuf/Earthquake.proto检查Earthquake.proto是否在此路径中的位置。如果你把它修好,它就会起作用。
https://stackoverflow.com/questions/60905403
复制相似问题