inferred type of appRouter cannot be named without a reference to server/node_modules/superjson

web:build: ./node_modules/server/src/routes/_app.ts:4:14
web:build: Type error: The inferred type of 'appRouter' cannot be named without a reference to 'server/node_modules/superjson'. This is likely not portable. A type annotation is necessary.
web:build:
web:build: 2 | import { todoRouter } from './todo';
web:build: 3 |
web:build: > 4 | export const appRouter = router({
web:build: | ^
web:build: 5 | todo: todoRouter,
web:build: 6 | });
web:build: 7 |
web:build:  ELIFECYCLE  Command failed with exit code 1.
web:build: ERROR: command finished with error: command (C:\Users\masen\code\projects\spice\apps\web) pnpm run build exited (1)
web:build: ./node_modules/server/src/routes/_app.ts:4:14
web:build: Type error: The inferred type of 'appRouter' cannot be named without a reference to 'server/node_modules/superjson'. This is likely not portable. A type annotation is necessary.
web:build:
web:build: 2 | import { todoRouter } from './todo';
web:build: 3 |
web:build: > 4 | export const appRouter = router({
web:build: | ^
web:build: 5 | todo: todoRouter,
web:build: 6 | });
web:build: 7 |
web:build:  ELIFECYCLE  Command failed with exit code 1.
web:build: ERROR: command finished with error: command (C:\Users\masen\code\projects\spice\apps\web) pnpm run build exited (1)
3 Replies
Hycord | @ When Replying
import { router } from '../trpc';
import { todoRouter } from './todo';

export const appRouter = router({
todo: todoRouter,
});

export type AppRouter = typeof appRouter;
import { router } from '../trpc';
import { todoRouter } from './todo';

export const appRouter = router({
todo: todoRouter,
});

export type AppRouter = typeof appRouter;
whatplan
whatplan2y ago
maybe superjson isnt installed? npm i is worth a shot
Want results from more Discord servers?
Add your server