From 3973a5ba4fac148304cc6065fe0c2a5d57e33931 Mon Sep 17 00:00:00 2001 From: satyakwok Date: Thu, 7 May 2026 13:19:20 +0200 Subject: [PATCH] fix(api): declare viem as direct dep (was hoist-shadowed) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apps/api/src/routes/coinblast.ts has imported viem since the launchpad PR (recoverMessageAddress + isAddress for admin signature auth), but viem was never listed in apps/api/package.json — only in packages/chain and apps/indexer. tsx in dev/host pnpm hoist made it resolve anyway, but the apps/api Dockerfile filter-installs only @sentriscloud/indexer-api and its declared deps, so the compiled container has no viem under apps/api/node_modules and crashes at ESM resolve time: Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'viem' imported from /app/apps/api/src/routes/coinblast.ts Symptom only visible after rebuild — the running container kept serving the pre-import source until today's rebuild for the BigInt parse fix surfaced it. Pin to ^2.21.0 to match packages/chain + apps/indexer. --- apps/api/package.json | 3 ++- pnpm-lock.yaml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/api/package.json b/apps/api/package.json index 43fab5e..f5283f8 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -18,7 +18,8 @@ "@fastify/rate-limit": "^10.2.0", "fastify": "^5.2.0", "pino": "^9.5.0", - "drizzle-orm": "^0.36.0" + "drizzle-orm": "^0.36.0", + "viem": "^2.21.0" }, "devDependencies": { "@types/node": "^22.10.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d8d5712..9f790d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,9 @@ importers: pino: specifier: ^9.5.0 version: 9.14.0 + viem: + specifier: ^2.21.0 + version: 2.48.4(typescript@5.9.3) devDependencies: '@types/node': specifier: ^22.10.0