Industrial
Industrial
TtRPC
Created by Industrial on 4/24/2023 in #❓-help
Cannot find module '@trpc/react-query/server' or its corresponding type declarations
Updated the packages and now it works. Thanks!
13 replies
TtRPC
Created by Industrial on 4/24/2023 in #❓-help
Cannot find module '@trpc/react-query/server' or its corresponding type declarations
{
"private": true,
"name": "@code9/todo-web",
"version": "0.1.0",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "pnpm lint:tsc && pnpm lint:eslint",
"lint:eslint": "eslint --fix --cache .",
"lint:tsc": "tsc -p . --noEmit",
"pre-commit": "lint-staged",
"start": "next start"
},
"lint-staged": {
"*.{js,mjs,cjs,jsx,ts,tsx,json}": "pnpm lint"
},
"dependencies": {
"@emotion/cache": "^11.10.5",
"@emotion/css": "^11.10.6",
"@emotion/react": "^11.10.6",
"@emotion/server": "^11.10.0",
"@emotion/styled": "^11.10.6",
"@fontsource/roboto": "^4.5.8",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.11.16",
"@tanstack/react-query": "^4.18.0",
"@trpc/client": "^10.18.0",
"@trpc/next": "^10.18.0",
"@trpc/react-query": "^10.18.0",
"@trpc/server": "^10.18.0",
"clsx": "^1.1.1",
"next": "^13.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "^3.39.3",
"superjson": "^1.7.4",
"zod": "^3.0.0"
},
"devDependencies": {
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
"lint-staged": "^13.2.1",
"tsx": "^3.12.3",
"typescript": "^4.8.3"
}
}
{
"private": true,
"name": "@code9/todo-web",
"version": "0.1.0",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "pnpm lint:tsc && pnpm lint:eslint",
"lint:eslint": "eslint --fix --cache .",
"lint:tsc": "tsc -p . --noEmit",
"pre-commit": "lint-staged",
"start": "next start"
},
"lint-staged": {
"*.{js,mjs,cjs,jsx,ts,tsx,json}": "pnpm lint"
},
"dependencies": {
"@emotion/cache": "^11.10.5",
"@emotion/css": "^11.10.6",
"@emotion/react": "^11.10.6",
"@emotion/server": "^11.10.0",
"@emotion/styled": "^11.10.6",
"@fontsource/roboto": "^4.5.8",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.11.16",
"@tanstack/react-query": "^4.18.0",
"@trpc/client": "^10.18.0",
"@trpc/next": "^10.18.0",
"@trpc/react-query": "^10.18.0",
"@trpc/server": "^10.18.0",
"clsx": "^1.1.1",
"next": "^13.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "^3.39.3",
"superjson": "^1.7.4",
"zod": "^3.0.0"
},
"devDependencies": {
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
"lint-staged": "^13.2.1",
"tsx": "^3.12.3",
"typescript": "^4.8.3"
}
}
13 replies
TtRPC
Created by Industrial on 4/24/2023 in #❓-help
Cannot find module '@trpc/react-query/server' or its corresponding type declarations
actually, it's described here: https://trpc.io/docs/nextjs/ssg
13 replies
TtRPC
Created by Industrial on 4/24/2023 in #❓-help
Cannot find module '@trpc/react-query/server' or its corresponding type declarations
13 replies
TtRPC
Created by Industrial on 3/12/2023 in #❓-help
Cannot read properties of undefined (reading 'createTRPCReact')
That's all you need 🙂
9 replies
TtRPC
Created by Industrial on 3/12/2023 in #❓-help
Cannot read properties of undefined (reading 'createTRPCReact')
import { createResource } from 'solid-js'
import type { JSX } from 'solid-js/jsx-runtime'

import { trpc } from '@/lib/trpc'

export const Test = (): JSX.Element => {
const userId = '123'
const [user, { mutate, refetch }] = createResource(userId, async (id: string) => {
return await trpc.getUserById.query(id)
})
return <div>USER? {JSON.stringify(user())}</div>
}
import { createResource } from 'solid-js'
import type { JSX } from 'solid-js/jsx-runtime'

import { trpc } from '@/lib/trpc'

export const Test = (): JSX.Element => {
const userId = '123'
const [user, { mutate, refetch }] = createResource(userId, async (id: string) => {
return await trpc.getUserById.query(id)
})
return <div>USER? {JSON.stringify(user())}</div>
}
9 replies
TtRPC
Created by Industrial on 3/12/2023 in #❓-help
Cannot read properties of undefined (reading 'createTRPCReact')
I got it! I'm using SolidJS and not React so I don't need react-query.
9 replies
TtRPC
Created by Industrial on 3/12/2023 in #❓-help
Cannot read properties of undefined (reading 'createTRPCReact')
Thank you 🙂
9 replies
TtRPC
Created by Industrial on 3/12/2023 in #❓-help
Cannot read properties of undefined (reading 'createTRPCReact')
@backbone could you run git clone git@github.com:Industrial/test-astro-solid.git && cd test-astro-solid && pnpm i && pnpm dev to reproduce ?
9 replies
TtRPC
Created by Industrial on 3/12/2023 in #❓-help
Cannot read properties of undefined (reading 'createTRPCReact')
@backbone I did rm -rf node_modules && pnpm install and same thing
9 replies