Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

problem with building my api #3

@krisgrm

Description

@krisgrm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions