【问题标题】:Update protoc-gen-grpc-web on Linux在 Linux 上更新 protoc-gen-grpc-web
【发布时间】:2019-01-30 16:02:59
【问题描述】:

我通过 npm 安装了 grpc-web 和 protoc-gen-grpc-web。所以当我做npm list -g | grep grpc 时,我得到了

➜  frontend git:(master) ✗ npm list -g | grep grpc     
├─┬ @grpc-gen/protoc-gen-grpc-web@0.4.0
├── grpc-web@1.0.3
├─┬ protoc-gen-grpc@1.2.3

然后我尝试将 protoc-gen-grpc-web 插件更新到最新版本 1.0.3,但我不知道该怎么做。

我从https://github.com/grpc/grpc-web/releases 的发布页面下载了protoc-gen-grpc-web-1.0.3-linux-x86_64,并将文件protoc-gen-grpc-web 替换为/usr/local/lib/node_modules/@grpc-gen/protoc-gen-grpc-web/bin/。但仍然npm list 列出版本0.4.0。那么具体应该如何工作呢?

【问题讨论】:

  • 对于 macOS 运行 brew install protoc-gen-grpc-web

标签: angular grpc-web


【解决方案1】:

'@grpc-gen/protoc-gen-grpc-web' 和 'protoc-gen-grpc' 不是我们维护的 npm 包(即 Github 上的“grpc”组织)。从我们的发布页面下载protoc-gen-grpc-web插件是正确的:https://github.com/grpc/grpc-web/releases

【讨论】:

  • 那我该怎么办呢?抱歉这个愚蠢的问题,但是替换现有的 protoc-gen-grpc-web 没有成功。
  • 我最终回到了 grpc-web@1.0.0 和 protoc-gen-grpc-web@0.4.0,因为最新版本存在一些奇怪的编译问题。也许是我的错,但目前我没有时间调查。
猜你喜欢
  • 1970-01-01
  • 2022-11-28
  • 2021-02-25
  • 1970-01-01
  • 1970-01-01
  • 2021-04-19
  • 2023-03-12
  • 2016-04-15
  • 1970-01-01
相关资源
最近更新 更多