The binding declares cpu: wasm32, so npm on x64 hosts (Vercel) fails
with EBADPLATFORM. The nodesandbox runtime already installs every
package's *-wasm32-wasi optional dependency (rolldown's included), so
the app doesn't need to list it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sandbox loads Vite's native tools as WASI (NAPI_RS_FORCE_WASI=error)
and only ships glue for rolldown 1.1.x. Vite 8.3 pulls rolldown 1.2.x,
whose binding needs emnapi 2.0 alpha, so boot failed with 'WASI binding
not found'. Match the runtime-host harness TanStack sample instead:
- Pin vite 8.1.3, rolldown + @rolldown/binding-wasm32-wasi 1.1.4,
@vitejs/plugin-react 6.0.0, tailwindcss + @tailwindcss/vite 4.3.1
(exact versions: the sandbox resolves package.json, not yarn.lock)
- Drop Nitro (it brings rolldown 1.2.x) and the Vercel config
- Hono now sits in src/server.ts, Start's server entry, routing /api/*
ahead of start.fetch, as in the harness
- dev runs 'vite dev --host 0.0.0.0 --port 3000'; config is .mjs
- Await product recommendations in the loader to fix a hydration
mismatch between the SSR skeleton and the settled client render
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vercel auto-detected the Hydrogen preset from the @shopify/hydrogen
dependency and failed building a 'hydrogen' Edge Function. The app is now
TanStack Start (SSR via Nitro), and vercel.json pins the tanstack-start
preset and installs with Corepack so Yarn 4 is used.
- Router factory with per-request QueryClient and SSR query dehydration
- Hono API mounted as a Start server route at /api/*
- Account reads in loaders go through server functions (cookies on SSR)
- Loaders prefetch listing pages so products are in the server HTML
- Add graphql peer dependency for gql.tada
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports nextjs-templates/shopify-storefront to Vite, TanStack Router/Query,
Tailwind v4 and Hono, without the AI store assistant.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>