【发布时间】: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