【发布时间】:2019-01-07 16:24:04
【问题描述】:
我创建了一个具有 TypeScript 功能的全新 VueJS 应用程序。
当我使用:
protoc -I=. service.proto --js_out=import_style=typescript:. --grpc web_out=import_style=typescript,mode=grpcwebtext:.
我得到以下文件:
当我在我的 VueJS 项目中将它们移至 src/_protos 并尝试移至 import { PlatformClient } from '@/_protos/ServiceServiceClientPb'; 时,出现以下错误:
Failed to compile.
./src/_protos/ServiceServiceClientPb.ts
Module not found: Error: Can't resolve './service_pb' in '/Users/theobouwman/dev/woodyshousing/woody_web/src/_protos'
这是为什么?
【问题讨论】:
标签: javascript typescript vue.js grpc grpc-web