Skip to content

the api folder's context.ts Cannot find module 'hono' or its corresponding type declarations. #804

@luzede

Description

@luzede

The command I ran to start the project

{
  "$schema": "https://r2.better-t-stack.dev/schema.json",
  "version": "3.14.1",
  "createdAt": "2026-01-04T17:05:12.474Z",
  "database": "postgres",
  "orm": "prisma",
  "backend": "hono",
  "runtime": "bun",
  "frontend": ["tanstack-router"],
  "addons": ["biome", "turborepo"],
  "examples": ["todo", "ai"],
  "auth": "better-auth",
  "payments": "none",
  "packageManager": "bun",
  "dbSetup": "docker",
  "api": "orpc",
  "webDeploy": "none",
  "serverDeploy": "none",
}

The issue:

Image

The issue probably is that hono is used in two modules, one in server and one in api, but the hono exists only in server's package.json but not in the project's package.json.
Image

The project package json should track the hono version and use "catalog:" for both server and api folder's package.jsons

By making the changes below and running "bun install", the problem got fixed
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesUpdate one or more dependencies version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions