본문 바로가기

전체 글86

[react-query]Error: No QueryClient set, use QueryClientProvider to set one app.jsx 에서 queryClient 를 만들어주고 queryClientProvider 로 app에서 리턴하는 것 전체를 감싸주면 되는데 이렇게 해줘야되는걸 이렇게 오타내서 에러가 났다 ^_T import "./App.css"; import { InfinitePeople } from "./people/InfinitePeople"; import { InfiniteSpecies } from "./species/InfiniteSpecies"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; const .. 2023. 8. 26.
Try-catch is not working for 400 errors in JS try -catch 에서 error 가 나는데도 계속 try 로 들어갔다... async await 을 확인하지 못한 나 ... axios.post에 await 붙여주니까 바로 됐다. https://stackoverflow.com/questions/59582828/try-catch-is-not-working-for-400-errors-in-js Try-catch is not working for 400 errors in JS This is getting on my nerves, I've been checking the code for a few hours and can't spot the problem. in the below code, I'm using an invalid object in the bo.. 2023. 7. 26.
Error: DataSource is not set for this entity. at Function.getRepository / 폴더구조에서 ** 과 * 의 뜻 Error: DataSource is not set for this entity. at Function.getRepository typeorm 에서 각 entity 들은 data source options 에 등록 되어있어야한다. entities: ["src/entities/*.ts"], 이렇게 해 주니까 잘 됐다. Entities - typeorm int, int2, int4, int8, smallint, integer, bigint, decimal, numeric, real, float, float4, float8, double precision, money, character varying, varchar, character, char, text, citext, hstore, bytea, bit, .. 2023. 7. 26.
TypeORMError: Entity metadata for Sub#posts was not found. Check if you specified a correct entity object and if it's connected in the connection options. TypeORMError: Entity metadata for Sub#posts was not found. Check if you specified a correct entity object and if it's connected in the connection options. Sub Entity에 @Entity 데코레이터를 안 붙여줘서 난 오류였다. @Entity 붙여주고나니 해결됐다. https://stackoverflow.com/questions/56693067/entity-metadata-for-roleusers-was-not-found Entity metadata for Role#users was not found Trying to make OneToMany and ManyToOne relatio.. 2023. 7. 26.
[Leetcode/JS] 350. Intersection of Two Arrays II 문제링크 350. Intersection of Two Arrays II https://leetcode.com/problems/intersection-of-two-arrays-ii/description/ Intersection of Two Arrays II - LeetCode Can you solve this real interview question? Intersection of Two Arrays II - Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as it shows in both arrays and you.. 2023. 7. 18.
[Leetcode/JS] 226. Invert Binary Tree 문제링크 226. Invert Binary Tree https://leetcode.com/problems/invert-binary-tree/description/ Invert Binary Tree - LeetCode Can you solve this real interview question? Invert Binary Tree - Given the root of a binary tree, invert the tree, and return its root. Example 1: [https://assets.leetcode.com/uploads/2021/03/14/invert1-tree.jpg] Input: root = [4,2,7,1,3,6,9] Output: [4 leetcode.com 문제 설명 Give.. 2023. 7. 18.
[Leetcode/JS] 257. Binary Tree Paths 문제링크 https://leetcode.com/problems/binary-tree-paths/ Binary Tree Paths - LeetCode Can you solve this real interview question? Binary Tree Paths - Given the root of a binary tree, return all root-to-leaf paths in any order. A leaf is a node with no children. Example 1: [https://assets.leetcode.com/uploads/2021/03/12/paths-tree.jpg] In leetcode.com 기억하면 좋을 것 JavaScript에서 배열을 새로운 변수에 할당하는 경우 새로운 배.. 2023. 7. 17.
[Leetcode/JS] 404. Sum of Left Leaves 문제링크 404. Sum of Left Leaves https://leetcode.com/problems/sum-of-left-leaves/description/ Sum of Left Leaves - LeetCode Can you solve this real interview question? Sum of Left Leaves - Given the root of a binary tree, return the sum of all left leaves. A leaf is a node with no children. A left leaf is a leaf that is the left child of another node. Example 1: [https://ass leetcode.com Given the .. 2023. 7. 17.
[Leetcode/JS] 111. Minimum Depth of Binary Tree 문제링크 111. Minimum Depth of Binary Tree https://leetcode.com/problems/minimum-depth-of-binary-tree/description/ Minimum Depth of Binary Tree - LeetCode Can you solve this real interview question? Minimum Depth of Binary Tree - Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. Note: A leaf.. 2023. 7. 13.