mguay22 / nestjs-grpc

40 stars 7 forks source link

Auth.proto Does Not Exist #1

Closed masnwilliams closed 1 year ago

masnwilliams commented 1 year ago

Overview

When cloning this repository and running dev for each service, I run into the following error: [Nest] 74235 - 08/24/2023, 3:43:21 PM ERROR [ClientProxy] ENOENT: no such file or directory, open '/nestjs-grpc/dist/apps/gateway/auth.proto'

Screenshots

Here is the structure of my dist directory:

Screenshot 2023-08-24 at 3 49 38 PM

As it shows, there is no auth.proto in the gateway directory.

Any help would be appreciated as this seems to be a very simple implementation but is failing for some reason.

sebastian-simionescu commented 1 year ago

@mguay22 any idea what is going on ? I have the same issue

NguyenDucDuc commented 1 year ago

In the "gateway-app" you find the user.module and edit the protoPath: ../.././auth/auth.proto

masnwilliams commented 1 year ago

In the "gateway-app" you find the user.module and edit the protoPath: ../.././auth/auth.proto

This solved my issue. @sebastian-simionescu look at this

Updating the following code in apps/gateway/src/users/users.module.ts

Old: protoPath: join(__dirname, '../auth/auth.proto') New: protoPath: join(__dirname, '../.././auth/auth.proto')

NguyenDucDuc commented 1 year ago

@masnwilliams Another solution is if you don't want to fix the path of protoPath then you can run the command "npm run start:dev gateway" instead of "npm run start:dev"