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

problem with building my api #3

Open
krisgrm opened this issue Jul 13, 2023 · 0 comments
Open

problem with building my api #3

krisgrm opened this issue Jul 13, 2023 · 0 comments

Comments

@krisgrm
Copy link

krisgrm commented Jul 13, 2023

so i have an interesting usecase.. i have 2 microservices, that need to talk with each other...

  • one is bun+elysia
  • another one is nextjs serverless functions

I setup the elysia with trpc, and I also created a small "wrapper" package, that imports trpc router and returns the trpcApi object.
i did some small tests inside the package and things are working fine.

But then I import this "wrapper" into my nextjs, in order to make both APIs talk with each other and when i do that I get the error below (during build time)

../../node_modules/.pnpm/@elysiajs+trpc@0.5.2_@trpc+server@10.34.0_elysia@0.5.22/node_modules/@elysiajs/trpc/src/index.ts:19:17
Type error: Property 'path' does not exist on type 'ValueError | undefined'.

  17 |         if (check.Check(value)) return value
  18 | 
> 19 |         const { path, message } = [...check.Errors(value)][0]
     |                 ^
  20 | 
  21 |         throw new TRPCError({
  22 |             message: `${message} for ${path}`,
 ELIFECYCLE  Command failed with exit code 1.

I am using PNPM as my package manager, even for the bun project I am usign PNPM and packageManager and BUN just for the runtime

thanks for any help in advance

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