Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import xxx : file does not exist #1042

Closed
cruvie opened this issue Dec 30, 2024 · 1 comment
Closed

import xxx : file does not exist #1042

cruvie opened this issue Dec 30, 2024 · 1 comment

Comments

@cruvie
Copy link

cruvie commented Dec 30, 2024

dir tree
longshot20241230125418

buf.gen.yaml

version: v2
inputs:
  - directory: .
plugins:
  - local: protoc-gen-es
    opt: target=ts
    include_imports: true
    out: ./lib_ts

kk_rbac_api_permission.proto

syntax = "proto3";
package demo;
option go_package = "kk_go_kit/demo/base";
import "demo/kk_rbac_pb_permission.proto";

message KKRBACPermissionList {
  message Input {
  }

  message Output {
    PBListPermission List = 1;
  }
}

kk_rbac_pb_permission.proto

syntax = "proto3";
package demo;
import "google/protobuf/timestamp.proto";

option go_package = "kk_go_kit/demo/base";

message PBPermission {
  uint64 Id = 1;
  google.protobuf.Timestamp CreatedAt = 2;
  google.protobuf.Timestamp UpdatedAt = 3;
  int32 Status = 4;
  string Remark = 5;
  string ApiTag = 6;
  string ApiId = 7;
  string ApiName = 8;
}

message PBListPermission{
  repeated PBPermission List = 1;
}

run cmd

cruvie@CruvieMacAir-4 demo % npx buf generate
kk_rbac_api_permission.proto:4:8:import "demo/kk_rbac_pb_permission.proto": file does not exist
@cruvie
Copy link
Author

cruvie commented Dec 31, 2024

fixed

cd ../
npx buf generate --template demo/buf.gen.yaml

@cruvie cruvie closed this as completed Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant