Ofir Smolinsky
Ofir Smolinsky
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
😍
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
whatre u working on btw?
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
yea took me a couple hours yesterday, glad you got it working : )
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
monorepo is mostly for sharing depndencies yea
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
i guess TRPC is considered shared dependency : ) but try to solve it without turborepo first
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
ahhh i see
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
i reccomend turborepo
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
is it established repo or new one?
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
what monorepo tool u use btw?
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
and make sure to use this version maybe it will solve, make sure to delete node modules and dists before thinking it dont work
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
let me know if it solve the problem, it was such a headache yesterday lol
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
I use turborepo Structure is a NextJS frontend, express backend in another dir, and a common API package where the appRouter is defined
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
trpc:
"@trpc/client": "^11.0.0-next-beta.193",
"@trpc/react-query": "^11.0.0-next-beta.193",
"@trpc/client": "^11.0.0-next-beta.193",
"@trpc/react-query": "^11.0.0-next-beta.193",
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
NextJS base TSConfig
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Next.js",
"extends": "./base.json",
"compilerOptions": {
"plugins": [{ "name": "next" }],
"module": "ESNext",
"moduleResolution": "Bundler",
"allowJs": true,
"jsx": "preserve",
"noEmit": true },
}
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Next.js",
"extends": "./base.json",
"compilerOptions": {
"plugins": [{ "name": "next" }],
"module": "ESNext",
"moduleResolution": "Bundler",
"allowJs": true,
"jsx": "preserve",
"noEmit": true },
}
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
Base TSConfig (the one being inherited in some of these)
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"compilerOptions": {
"declaration": false,
"declarationMap": false,
"esModuleInterop": true,
"incremental": false,
"isolatedModules": true,
"lib": ["es2022", "DOM", "DOM.Iterable"],
"module": "NodeNext",
"moduleDetection": "force",
"moduleResolution": "NodeNext",
"noUncheckedIndexedAccess": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2022",
"paths": {
"@trpc/server/*": ["../../node_modules/@trpc/server/*"]
}
}
}
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"compilerOptions": {
"declaration": false,
"declarationMap": false,
"esModuleInterop": true,
"incremental": false,
"isolatedModules": true,
"lib": ["es2022", "DOM", "DOM.Iterable"],
"module": "NodeNext",
"moduleDetection": "force",
"moduleResolution": "NodeNext",
"noUncheckedIndexedAccess": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2022",
"paths": {
"@trpc/server/*": ["../../node_modules/@trpc/server/*"]
}
}
}
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
Server TSConfig:
{
"compilerOptions": {
/* Language and Environment */
"target": "es2022",
"module": "commonjs",
/* Modules */
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
"baseUrl": "./",
"rootDir": "./",
/* Emit */
"outDir": "./dist/" /* Specify an output folder for all emitted files. */,
"paths": {
"@src/*": ["./src/*"]
},
/* Interop Constraints */
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,

/* Type Checking */
"strict": true /* Enable all strict type-checking options. */,

/* Completeness */
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"resolveJsonModule": true,
"strictPropertyInitialization": false,

/* These are new rules we are checking */
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"typeRoots": ["./typings", "./node_modules/@types"],
"sourceMap": true,
"incremental": true,
"strictNullChecks": true,
"noImplicitAny": false,
"strictBindCallApply": true,
"noFallthroughCasesInSwitch": true
}
}
{
"compilerOptions": {
/* Language and Environment */
"target": "es2022",
"module": "commonjs",
/* Modules */
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
"baseUrl": "./",
"rootDir": "./",
/* Emit */
"outDir": "./dist/" /* Specify an output folder for all emitted files. */,
"paths": {
"@src/*": ["./src/*"]
},
/* Interop Constraints */
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,

/* Type Checking */
"strict": true /* Enable all strict type-checking options. */,

/* Completeness */
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"resolveJsonModule": true,
"strictPropertyInitialization": false,

/* These are new rules we are checking */
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"typeRoots": ["./typings", "./node_modules/@types"],
"sourceMap": true,
"incremental": true,
"strictNullChecks": true,
"noImplicitAny": false,
"strictBindCallApply": true,
"noFallthroughCasesInSwitch": true
}
}
38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
Root TSConfig:
{
"extends": "@repo/typescript-config/base.json"
}
{
"extends": "@repo/typescript-config/base.json"
}
Frontend TSConfig:
{
"extends": "@repo/typescript-config/nextjs.json",
"compilerOptions": {
"baseUrl": "../../",
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", "next.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
{
"extends": "@repo/typescript-config/nextjs.json",
"compilerOptions": {
"baseUrl": "../../",
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", "next.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
Packages/API TSConfig:
{
"extends": "@repo/typescript-config/base.json",
"compilerOptions": {
"outDir": "dist",
"incremental": true,
"paths": {
"@trpc/server/*": ["../../node_modules/@trpc/server/*"]
}
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

{
"extends": "@repo/typescript-config/base.json",
"compilerOptions": {
"outDir": "dist",
"incremental": true,
"paths": {
"@trpc/server/*": ["../../node_modules/@trpc/server/*"]
}
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

38 replies
TtRPC
Created by yeetcode.io on 7/2/2024 in #❓-help
The inferred type of 'trpc' cannot be named without a reference to '...'
@yeetcode.io what version do u have installed? i had the same issue yesterday and finally made it work i think mostly due to upgrading to v11 and doing some tsconfig changes
38 replies
TtRPC
Created by kinsyu on 6/22/2024 in #❓-help
createTRPCReact cannot be named without a reference to x
facing exact same issue here
9 replies
TtRPC
Created by kinsyu on 6/22/2024 in #❓-help
createTRPCReact cannot be named without a reference to x
yo bro @kinsyu did u manage to solve it?
9 replies