[webpack] 개발서버 실행시 Cannot Get /
2023. 8. 28. 21:28
개발/Error note
Cannot GET /유데미 강의를 따라서 webpack 실습 중 개발서버 설정을하고 npm start를 하면 해당오류가 났다. 저거 외에는 다른 오류가 없어서 답답해 하던 찰나 Webpack-dev-server "Cannot GET /"i'm trying to get my webpack-dev-server to run but i face always the error "Cannot Get /" at the browser. I know that there are serveral questions with the same error, but none of them he...stackoverflow.com나랑 똑같은 강의를 듣는중인 사람의 stackoverflow글을 찾게됐다. 해결방법은 package.js..
[React] Cannot find module 'react-dom/client' or its corresponding type declarations.ts(2307) | resolve 'react-dom/client' in '경로' Parsed request is a module
2023. 7. 25. 06:53
개발/Error note
npm run dev로 웹팩을 실행하는데 에러가 뭔가 왕창 났다. 가장 상단 에러는 resolve 'react-dom/client' in '경로' Parsed request is a module였다. client.jsx에서도 Cannot find module 'react-dom/client' or its corresponding type declarations.ts(2307)라는 오류가 뿜뿜하고있었다. import * as React from "react" import { createRoot } from "react-dom/client" import Games from "./Games" const container = document.getElementById("root") const root = cre..
[MongoDB] Error [MongoServerError]: bad auth : authentication failed
2023. 7. 14. 07:00
개발/Error note
강의 따라서 몽고디비 연결하는데 자꾸 Error [MongoServerError]: bad auth : authentication failed 라는 에러가 떴다. 나의 해결방법 0: 코드에 오타나 연결이 잘못된 부분이 있나 문서도 보고 다 찾아봤음 나의 해결방법 1: GPT한테 물어본다. 지피티한테 코드 복사해서 물어봤더니 connect부분이 잘못됐다고 그래서 다시보는데 맞는데.... 라고 생각하다가 아차! 싶은 부분이 있었다. 여기서 EDIT 누르면 아래와 같은 창이 뜨는데 Autogenerate Secure Password로 비밀번호 만들고 Update User를 안눌렀었다. 젠장 다시 패스워드 만들고 업데이트 한 후에 실행하니까 잘되더라 쉬익..
[Typescript] TS2339: Property 'children' does not exist on type '{}'.
2023. 7. 12. 22:31
개발/Error note
const TodosContextProvider: React.FC = (props) => { ...코드생략 return ( {props.children} ); }; 강의를 따라하는데 props.children 은 따로 명시를 해주지 않아도 children이 자동으로 있다고 그냥 쭉쭉 진도나가는데 나는 자꾸 존재하지 않는다고 떴다. 시도1const TodosContextProvider: React.FC = (props) => { ...코드생략 return ( {props.children} ); };그래서 FC에 제네릭으로 빈 객체를 넣어줘봤다. 응 그래도 빨간줄 시도2type Props = { children: React.ReactNode; }; const TodosContextProvider: React..
[React] '파일명' cannot be used as a JSX component. Its return type 'Element | undefined' is not a valid JSX element. Type 'undefined' is not assignable to type 'Element | null'.
2023. 7. 11. 08:17
개발/Error note
실행 시 자꾸 위와 같은 오류가 떴다. '파일' cannot be used as a JSX component. Its return type 'Element | undefined' is not a valid JSX element. Type 'undefined' is not assignable to type 'Element | null'. 오류는 말그대로 JSX엘리먼트를 반환하고있지 않다는말이었다. const GameMatcher = () => { const params = useParams() if (!params) { return 일치하는 게임이 없습니다 } if (params.name === "number-baseball") { return } else if (params.name === "rock-s..