묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨따라하며 배우는 리액트 A-Z[19버전 반영]
Lists.js에서 List컴포넌트로 프롭스 보내줄때,
<List key={data.id} id={data.id} title={data.title} completed={data.completed} todoData={todoData} setTodoData={setTodoData} provided={provided} snapshot={snapshot} />List에 프롭스 key를 넘겨주었는데왜 List.js에서는 key를 받지 않은 건가요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
오류 해결에 도움이 필요합니다.
시퀄라이즈 sync 부분 강의까지 들었습니다. port는 3306번을 다른게 차지하고 있어서 3307을 사용했습니다. node app.js 했는데 실행이 안되네요.. 오류를 파일 부분을 찾아보려했는데 다 모듈 관련된 부분인거 같아서 어디를 봐야 할지 막혔습니다. 워크벤치도 연결이 안되는 상황입니다. 서버 실행 중ConnectionRefusedError [SequelizeConnectionRefusedError]: connect ECONNREFUSED 127.0.0.1:3307 at ConnectionManager.connect (/Users/jinkyungjung/Documents/programming/TIL/react-nodebird/prepare/back/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:92:17) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async ConnectionManager._connect (/Users/jinkyungjung/Documents/programming/TIL/react-nodebird/prepare/back/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:220:24) at async /Users/jinkyungjung/Documents/programming/TIL/react-nodebird/prepare/back/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:174:32 at async ConnectionManager.getConnection (/Users/jinkyungjung/Documents/programming/TIL/react-nodebird/prepare/back/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:197:7) at async /Users/jinkyungjung/Documents/programming/TIL/react-nodebird/prepare/back/node_modules/sequelize/lib/sequelize.js:304:26 at async MySQLQueryInterface.tableExists (/Users/jinkyungjung/Documents/programming/TIL/react-nodebird/prepare/back/node_modules/sequelize/lib/dialects/abstract/query-interface.js:102:17) at async Function.sync (/Users/jinkyungjung/Documents/programming/TIL/react-nodebird/prepare/back/node_modules/sequelize/lib/model.js:939:21) at async Sequelize.sync (/Users/jinkyungjung/Documents/programming/TIL/react-nodebird/prepare/back/node_modules/sequelize/lib/sequelize.js:376:9) { parent: Error: connect ECONNREFUSED 127.0.0.1:3307 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) { errno: -61, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 3307, fatal: true }, original: Error: connect ECONNREFUSED 127.0.0.1:3307 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) { errno: -61, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 3307, fatal: true }}
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
route에서 res.status(201).json시 undefined
안녕하세요 선생님게시글 수정을 route에서 처리하고 마지막으로 res.status(201).json(fullPost) 이렇게 게시글 정보를 담아서 보내려는데 자꾸 사가에서 데이터를 undefined로 받습니다..담기 전에 fullPost를 콘솔로 찍어보면 데이터가 잘 들어가 있는데 프론트로 넘어가면 undefined로 바뀌어요.그래서 단순 문자열도 res.status(201).json('성공');이런 식으로 보내봤는데도data가이렇게 undefined로 뜨는건 어느 부분을 봐야 하는 건가요?
-
미해결따라하며 배우는 리액트 A-Z[19버전 반영]
오류 질문
검색을 해보니 컴포넌트 명 관련해서 에러 라고 나와져있는데 소스 를 확인해봐도 오타 문제는 아닌거같아 강사님께 여쭤봅니다 ㅠㅜ 무슨문제일까요 ?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
writeHead 부분
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. Location에 /login만 해놓으니까 오류만 뜨고 로그인페이지로 안가고 커뮤니티 페이지로 들어가져서 경로를 아래처럼 바꿔더니 로그인페이지로 잘 가지긴 하는데 단순 경로 문제인가요??오류도 정상적으로 쿠키가 없다고 뜹니다
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
로그인페이지, 회원가입페이지 못들어가게하는 부분
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 이 부분에서 axios.get으로 보내주는 쿠키가 없는데 어떻게 유저가 로그인을 했다는게 인증되는건가요??
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
강의에서 사용하고 있는 next.js 버전으로 설치는 어떻게 하나요?
현재 next.js를 설치하려고 하면 13.2버전으로 설치가 되고 딱히 특정 버전을 설치해주는 기능은 없는 듯 합니다. 13버전과 강의에서 쓰이는 12버전은 사뭇 다르다고 생각이 듭니다.해당 강의에서 쓰고 있는 버전이 정확히 뭔지. 그리고 해당 버전으로 다운그레이드 혹은 설치를 하려면 어떻게 해야하는지 알려주실 수 있나요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
Section Quiz7 에서 질문이 있습니다.
퀴즈7에 있는 소주제 : 컴포넌트 재사용성과 수정 프로세스에서 질문이 있습니다.updateProduct로 수정하는 부분인데요.페이지 모두 만들었는데. 여기서 수정이 완료 됐다고 하는데 데이터가 null값으로 들어가네요..밑에는 container페이지와 queries페이지 입니다.어느 부분이 잘못됏는지 모르겠어서 질문드립니다. http://practice.codebootcamp.co.kr/graphql 에서 create부분에선 seller를 바로 받아오는데 밑에서는 productId로 받아옵니다. 이렇게 된다면 수정페이지 에서는 seller 는 수정 못하게 되는건가요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
Use 'import type' 에러 및 eslintrc.json
1. 강의를 똑같이 따라했는데 위와같은 메시지가 뜹니다!import 말고 import type을 쓰라는데 멘토님과 다르게 왜 이런 에러가 일어나는건가요?2. 저는 class파일에 eslintrc.json파일이 없어서 화면보고 그냥 따라 적기만 했는데 문제가 없을까요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
BoardWrite.presenter의 작성자 input 값의 defaultValue
BoardWrite부분의 presenter의 작성자 부분에defaultValue값에 자꾸 오류가 떠서 문의드립니다.비밀번호나 내용부분과 같이 다른 input창의 defaultValue에는 문제가 생기지 않는데 왜 유독 작성자 부분에만 에러가 뜨는지 모르겠습니다. 그런데 멘토님 파일에는 이전시간에 배우지 않았던 readOnly부분이 추가되어있고 defaultValue값도 수정되어있더라구요! readOnly에 대한 부분은 구글링을통해 왜 쓰는지는 알았지만 뒤에 {!!props.~~} 왜 이렇게 선언하는지와,defaultValue부분에 || "" 부분이 왜 들어가는지 모르겠습니다ㅠ
-
해결됨Next.js 시작하기(feat. 지도 서비스 개발)
궁금한 점이 있어요!
const mapOptions = { ..., logoControlOptions: { position: naver.maps.Position.BOTTOM_LEFT, }, };제 생각에는 전역 컨텍스트에 naver 객체가 생성되어 접근이 가능 한 것 같은데, 전역 컨텍스트에 naver라는 객체가 생성되는 시점이 궁금합니다.. !
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
로그인이 안되는데 백엔드까지 되돌리고 싶어요
[Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 60, [Symbol(kBytesRead)]: 1312, [Symbol(kBytesWritten)]: 198, [Symbol(RequestTimeout)]: undefined }, _header: 'GET /user/login/posts?lastId=0 HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 21, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user/login/posts?lastId=0', _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: [Socket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 404, statusMessage: 'Not Found', client: [Socket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: 'http://localhost:3060/user/login/posts?lastId=0', redirects: [], [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 18, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0, [Symbol(RequestTimeout)]: undefined }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'http://localhost:3060/user/login/posts?lastId=0', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], cookie: [Array], 'user-agent': [Array], 'accept-encoding': [Array], host: [Array] }, [Symbol(kUniqueHeaders)]: null }, response: { status: 404, statusText: 'Not Found', headers: AxiosHeaders { 'cache-control': 'no-store, must-revalidate', 'x-powered-by': 'Next.js', etag: '"97a-kcoLbH4v9/9OC6V5ZJ+Im5f6nEk"', 'content-type': 'text/html; charset=utf-8', vary: 'Accept-Encoding', date: 'Tue, 28 Feb 2023 17:16:27 GMT', connection: 'close', 'transfer-encoding': 'chunked', [Symbol(defaults)]: null }, config: { transitional: [Object], adapter: [Function: httpAdapter], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [AxiosHeaders], baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user/login/posts?lastId=0', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'GET /user/login/posts?lastId=0 HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user/login/posts?lastId=0', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: [Writable], [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(kUniqueHeaders)]: null }, data: '<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>: An unexpected error has occurred</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main.js?ts=1677604587215" as="script"/><link rel="preload" href="/_next/static/chunks/webpack.js?ts=1677604587215" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app.js?ts=1677604587215" as="script"/><noscript id="__next_css__DO_NOT_USE__"></noscript><style data-styled="" data-styled-version="5.3.6"></style></head><body><script src="https://polyfill.io/v3/polyfill.min.js?features=default%2Cdom4%2Ces2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces2022%2Ces2021%2Ces2020"></script><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587215"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{"lastId":"0"},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587215"></script><script src="/_next/static/chunks/main.js?ts=1677604587215"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587215"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587215"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587215"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587215"></script></body></html>' } } { type: 'LOAD_USER_POSTS_FAILURE', error: '<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>: An unexpected error has occurred</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main.js?ts=1677604587215" as="script"/><link rel="preload" href="/_next/static/chunks/webpack.js?ts=1677604587215" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app.js?ts=1677604587215" as="script"/><noscript id="__next_css__DO_NOT_USE__"></noscript><style data-styled="" data-styled-version="5.3.6"></style></head><body><script src="https://polyfill.io/v3/polyfill.min.js?features=default%2Cdom4%2Ces2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces2022%2Ces2021%2Ces2020"></script><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587215"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{"lastId":"0"},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587215"></script><script src="/_next/static/chunks/main.js?ts=1677604587215"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587215"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587215"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587215"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587215"></script></body></html>' } 1. getProps created store with state { user: { loadMyInfoLoading: false, loadMyInfoDone: false, loadMyInfoError: null, loadUserLoading: false, loadUserDone: false, loadUserError: null, followLoading: false, followDone: false, followError: null, unfollowLoading: false, unfollowDone: false, unfollowError: null, logInLoading: false, logInDone: false, logInError: null, logOutLoading: false, logOutDone: false, logOutError: null, signUpLoading: false, signUpDone: false, signUpError: null, changeNicknameLoading: false, changeNicknameDone: false, changeNicknameError: null, loadFollowingsLoading: false, loadFollowingsDone: false, loadFollowingsError: null, loadFollowersLoading: false, loadFollowersDone: false, loadFollowersError: null, removeFollowerLoading: false, removeFollowerDone: false, removeFollowerError: null, me: null, userInfo: null }, post: { mainPosts: [], singlePost: null, imagePaths: [], hasMorePosts: true, likePostLoading: false, likePostDone: false, likePostError: null, unlikePostLoading: false, unlikePostDone: false, unlikePostError: null, loadPostLoading: false, loadPostDone: false, loadPostError: null, loadPostsLoading: false, loadPostsDone: false, loadPostsError: null, addPostLoading: false, addPostDone: false, addPostError: null, removePostLoading: false, removePostDone: false, removePostError: null, addCommentLoading: false, addCommentDone: false, addCommentError: null, uploadImagesLoading: false, uploadImagesDone: false, uploadImagesError: null, retweetLoading: false, retweetDone: false, retweetError: null } } { type: 'LOAD_USER_POSTS_REQUEST', data: 'login' } { type: 'LOAD_MY_INFO_REQUEST' } { type: 'LOAD_USER_REQUEST', data: 'login' } { type: '@@redux-saga/CHANNEL_END' } 4. WrappedApp created new store with withRedux(NodeBird) { initialState: undefined, initialStateFromGSPorGSSR: undefined } 4. WrappedApp created new store with withRedux(NodeBird) { initialState: undefined, initialStateFromGSPorGSSR: undefined } AxiosError: Request failed with status code 404 at settle (C:\JS_workspace\React\js_prepare\front\node_modules\axios\dist\node\axios.cjs:1261:12) at Unzip.handleStreamEnd (C:\JS_workspace\React\js_prepare\front\node_modules\axios\dist\node\axios.cjs:2444:11) at Unzip.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'ERR_BAD_REQUEST', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [Function: httpAdapter], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: null }, validateStatus: [Function: validateStatus], headers: AxiosHeaders { Cookie: '', 'User-Agent': 'axios/1.1.2', 'Accept-Encoding': 'gzip, deflate, br', [Symbol(defaults)]: [Object] }, baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user/login/posts?lastId=0', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: Socket { connecting: false, _hadError: false, _parent: null, _host: 'localhost', _closeAfterHandlingError: false, _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 6, _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular *1], [Symbol(async_id_symbol)]: 965656, [Symbol(kHandle)]: null, [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 60, [Symbol(kBytesRead)]: 1312, [Symbol(kBytesWritten)]: 198, [Symbol(RequestTimeout)]: undefined }, _header: 'GET /user/login/posts?lastId=0 HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 23, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user/login/posts?lastId=0', _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: [Socket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 404, statusMessage: 'Not Found', client: [Socket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: 'http://localhost:3060/user/login/posts?lastId=0', redirects: [], [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 18, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0, [Symbol(RequestTimeout)]: undefined }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'http://localhost:3060/user/login/posts?lastId=0', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], cookie: [Array], 'user-agent': [Array], 'accept-encoding': [Array], host: [Array] }, [Symbol(kUniqueHeaders)]: null }, response: { status: 404, statusText: 'Not Found', headers: AxiosHeaders { 'cache-control': 'no-store, must-revalidate', 'x-powered-by': 'Next.js', etag: '"97a-oa4gEZ9VQR+Dh2MJsRlW/Zuu95Q"', 'content-type': 'text/html; charset=utf-8', vary: 'Accept-Encoding', date: 'Tue, 28 Feb 2023 17:16:27 GMT', connection: 'close', 'transfer-encoding': 'chunked', [Symbol(defaults)]: null }, config: { transitional: [Object], adapter: [Function: httpAdapter], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [AxiosHeaders], baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user/login/posts?lastId=0', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'GET /user/login/posts?lastId=0 HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user/login/posts?lastId=0', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: [Writable], [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(kUniqueHeaders)]: null }, data: '<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>: An unexpected error has occurred</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main.js?ts=1677604587289" as="script"/><link rel="preload" href="/_next/static/chunks/webpack.js?ts=1677604587289" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app.js?ts=1677604587289" as="script"/><noscript id="__next_css__DO_NOT_USE__"></noscript><style data-styled="" data-styled-version="5.3.6"></style></head><body><script src="https://polyfill.io/v3/polyfill.min.js?features=default%2Cdom4%2Ces2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces2022%2Ces2021%2Ces2020"></script><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587289"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{"lastId":"0"},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587289"></script><script src="/_next/static/chunks/main.js?ts=1677604587289"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587289"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587289"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587289"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587289"></script></body></html>' } } { type: 'LOAD_USER_POSTS_FAILURE', error: '<!DOCTYPE html><html><head><style data-next-hide-fouc="true">body{display:none}</style><noscript data-next-hide-fouc="true"><style>body{display:block}</style></noscript><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>: An unexpected error has occurred</title><noscript data-n-css="true"></noscript><link rel="preload" href="/_next/static/chunks/main.js?ts=1677604587289" as="script"/><link rel="preload" href="/_next/static/chunks/webpack.js?ts=1677604587289" as="script"/><link rel="preload" href="/_next/static/chunks/pages/_app.js?ts=1677604587289" as="script"/><noscript id="__next_css__DO_NOT_USE__"></noscript><style data-styled="" data-styled-version="5.3.6"></style></head><body><script src="https://polyfill.io/v3/polyfill.min.js?features=default%2Cdom4%2Ces2015%2Ces2016%2Ces2017%2Ces2018%2Ces2019%2Ces2022%2Ces2021%2Ces2020"></script><div id="__next"><div style="color:#000;background:#fff;font-family:-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body { margin: 0 }</style><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587289"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{"lastId":"0"},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587289"></script><script src="/_next/static/chunks/main.js?ts=1677604587289"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587289"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587289"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587289"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587289"></script></body></html>' } AxiosError: Request failed with status code 404 at settle (C:\JS_workspace\React\js_prepare\front\node_modules\axios\dist\node\axios.cjs:1261:12) at Unzip.handleStreamEnd (C:\JS_workspace\React\js_prepare\front\node_modules\axios\dist\node\axios.cjs:2444:11) at Unzip.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'ERR_BAD_REQUEST', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [Function: httpAdapter], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: null }, validateStatus: [Function: validateStatus], headers: AxiosHeaders { Cookie: '', 'User-Agent': 'axios/1.1.2', 'Accept-Encoding': 'gzip, deflate, br', [Symbol(defaults)]: [Object] }, baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: Socket { connecting: false, _hadError: false, _parent: null, _host: 'localhost', _closeAfterHandlingError: false, _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 6, _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [Circular *1], [Symbol(async_id_symbol)]: 965660, [Symbol(kHandle)]: null, [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 60, [Symbol(kBytesRead)]: 1307, [Symbol(kBytesWritten)]: 177, [Symbol(RequestTimeout)]: undefined }, _header: 'GET /user HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 22, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user', _ended: true, res: IncomingMessage { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 4, _maxListeners: undefined, socket: [Socket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 404, statusMessage: 'Not Found', client: [Socket], _consuming: false, _dumped: false, req: [Circular *1], responseUrl: 'http://localhost:3060/user', redirects: [], [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 18, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0, [Symbol(RequestTimeout)]: undefined }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: Writable { _writableState: [WritableState], _events: [Object: null prototype], _eventsCount: 3, _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'http://localhost:3060/user', [Symbol(kCapture)]: false }, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kEndCalled)]: true, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], cookie: [Array], 'user-agent': [Array], 'accept-encoding': [Array], host: [Array] }, [Symbol(kUniqueHeaders)]: null }, response: { status: 404, statusText: 'Not Found', headers: AxiosHeaders { 'cache-control': 'no-store, must-revalidate', 'x-powered-by': 'Next.js', etag: '"96e-3UMFuq1OQMITCj8aIaMUGQiLzzU"', 'content-type': 'text/html; charset=utf-8', vary: 'Accept-Encoding', date: 'Tue, 28 Feb 2023 17:16:27 GMT', connection: 'close', 'transfer-encoding': 'chunked', [Symbol(defaults)]: null }, config: { transitional: [Object], adapter: [Function: httpAdapter], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [AxiosHeaders], baseURL: 'http://localhost:3060', withCredentials: true, method: 'get', url: '/user', data: undefined }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [Socket], _header: 'GET /user HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Cookie: \r\n' + 'User-Agent: axios/1.1.2\r\n' + 'Accept-Encoding: gzip, deflate, br\r\n' + 'Host: localhost:3060\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/user', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: [Writable], <h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">An unexpected error has occurred<!-- -->.</h2></div></div></div></div><script src="/_next/static/chunks/react-refresh.js?ts=1677604587296"></script><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"development","isFallback":false,"gip":true,"head":[["meta",{"name":"viewport","content":"width=device-width"}],["meta",{"charSet":"utf-8"}],["title",{"children":": An unexpected error has occurred"}]]}</script><script nomodule="" src="/_next/static/chunks/polyfills.js?ts=1677604587296"></script><script src="/_next/static/chunks/main.js?ts=1677604587296"></script><script src="/_next/static/chunks/webpack.js?ts=1677604587296"></script><script src="/_next/static/chunks/pages/_app.js?ts=1677604587296"></script><script src="/_next/static/development/_buildManifest.js?ts=1677604587296"></script><script src="/_next/static/development/_ssgManifest.js?ts=1677604587296"></script></body></html>' }}무한 콘솔창 뜨는거 중간에 강제로 끊었습니다 back-jsonfront-jsonapp.jsconst express = require('express'); const cors = require('cors'); const session = require('express-session'); const cookieParser = require('cookie-parser'); const passport = require('passport'); const dotenv = require('dotenv'); const morgan = require('morgan'); const path = require('path'); const hpp = require('hpp'); const helmet = require('helmet'); const postRouter = require('./routes/post'); const postsRouter = require('./routes/posts'); const userRouter = require('./routes/user'); const hashtagRouter = require('./routes/hashtag'); const db = require('./models'); const passportConfig = require('./passport'); dotenv.config(); const app = express(); db.sequelize.sync() .then(() => { console.log('db 연결 성공'); }) .catch(console.error); passportConfig(); if (process.env.NODE_ENV === 'production') { app.use(morgan('combined')); app.use(hpp()); app.use(helmet()); } else { app.use(morgan('dev')); } app.use(cors({ origin: ['http://localhost:3060', 'nodebird.com'], credentials: true // cookie 전달 })); app.use('/', express.static(path.join(__dirname, 'uploads'))); app.use(express.json()); // app.use(express.urlencoded({ extended: true })); app.use(cookieParser('nodebirdsecret')); app.use(session()); app.use(passport.initialize()); app.use(passport.session({ saveUninitialized: false, resave: false, secret: process.env.COOKIE_SECRET })); app.get('/', (req, res) => { res.send('hello express'); }); app.use('/posts', postsRouter); app.use('/post', postRouter); app.use('/user', userRouter); app.use('/hashtag', hashtagRouter); app.listen(3065, () => { console.log('서버 실행중!'); }); 이전에 했던거 되돌리고싶어요백엔드까지 했던곳으로 되돌리고 다시하고 싶은데 로그인하면 이렇게 무한로딩 되면서 이상한 콘솔창 무한으로 뜹니다 서버 에러 같은데 어딘지 모르겠습니다port ? 404 에러 , asios 에러 ?로그인 안되는데 찾을수가 없습니다
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
user 과 auth에서 인증 부분
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.user.ts하고auth.ts에서이 부분이 같은데user.ts는 유저정보를 가져오기위한 미들웨어이고auth.ts는 인증을 위한 부분인데if(!user)이 둘다 있는 이유가 있을까요?그저 user.ts가 user정보를 가져오는데 조건에 해당하는 user정보가 없으면 안되니까(null) user.ts에 if(!user)이 있는건가요??제가 제대로 이해하고 있는지 헷갈려서요 ㅠㅠㅠ
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
포트폴리오 - modal에서의 오류
주소입력창 까지 잘 진행되었는데 비밀번호 모달창을 만들면서 부터 오류가 나기 시작했습니다. 어디서부터 잘 못된 것인지 잘 모르겠는데.. 계속 이런 오류가 뜹니다. 어떻게 해결해야 할까요?
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
시퀄라이즈 관계성 맺은 테이블 수정 질문
안녕하세요 선생님.시퀄라이즈에서 모델 끼리 관계성을 맺어서 route에서 const post = await Post.create({'이하 생략'}); 이런 식으로 하면 Post가 Hashtag와 관계성이 있을 때 post.addHashtags를 할 수 있다는건 알겠는데..이건 create시에만 쓸 수 있는 건가요?이런 질문을 드리는 이유는 게시글에서 해시태그를 수정하려 하니까 일단 Post.update를 해야 하는데, 그러면 따로 Hashtag테이블에 있는 해시태그를 수정하려니까 중간 테이블이 있어서 쉽지 않을것 같아 그냥 row query로 Hashtag중간테이블에서 게시글 아이디를 지워버리고 다시 해시태그를 생성하려고 post.addHashtags를 사용하고 싶어서 그렇습니다.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
로그인 회원가입 404 (Not Found)
로그인 회원가입시 이런 오류코드가 뜨는데, DB와 백엔드 연결에서 문제가 나는 건가요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
쿠키에 대해서
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.로그인시 아이디와 비밀번호 → 서버(유저의 정보가 맞는지 확인 후 토큰 발급 → 쿠키에 저장 : 하지만 도메인 주소가 다르면 쿠키가 전송이안됨왜 쿠키는 도메인주소가 다르면 쿠키가 전송이 안될까요?과거 강의인 "노드 리액트 기초강의" 에서 Express에서 제공하는 cookie-parser을 이용해서 서버에서 토큰을 쿠키에 저장했었는데 이 방법도 사용해도 될까요?? - 이는 여기 강의에서 설치한 cookie모듈과 비슷한 건가요??토큰발급 후 클라이언트에 보내주고 클라이언트에서 쿠키에 저장하는 방법은?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
netlify 배포시 cors 문제
안녕하세요 자유게시판을 어느정도 구현해서 netlify를 통해 배포해보려고 하니 cors 문제로 api가 작동하지 않습니다. 어떻게 해야 해결할 수 있을까요 ? Access to fetch at 'https://backendonline.codebootcamp.co.kr/graphql' from origin 'https://brilliant-rabanadas-0c6769.netlify.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:3000' that is not equal to the supplied origin. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
deserializeUser 에서 user 사용 req.user 언디파인드
routes/post.js 게시글 등록 요청시User객체에 id값을 req.user.id로 설정하려하는데에러나서 req.user 콘솔 찍어보면 undefined 가 출력됩니다.passport/index.js 에서 deserializeUser 를 통해 user값이 req.user로 세팅되는걸로 들었는데 반환값이 없네요 ..passport.deserializeUser()에 console.log 찍어보면 아무것도 출력되는게 없습니다.
-
해결됨따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
next.js 버전이 12인건가요?
강의에서 사용하고 있는 next 버전이 궁금합니다.12버전인가요?