묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[리뉴얼] 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 }}
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
나만의미니프로젝트 cheerio관련질문
원하는 키워드의 값을 담은 상수를 console.log(key,value) 하면 줄바꿈되면서 안에 있는 전체 값들이 나오더라구요 ( const key = $(el).attr("property").split(":")[1]; const value = $(el).attr("content"); 부분입니다)근데 이 값들을 db에 저장하려 for문을 이용해 배열에 넣어봤더니 console.log(key,value)해서 나온 값들이 아닌 마지막 값만 들어갑니다 key와 value에 어떤 형태로 값이 스크랩핑되어 들어가있는건가요..?상수에 배열형태로 들어간 것도 아니고 한줄로 값이 들어간 것도 아니고 .. console.log하면 전체가 나오기는 하나줄바꿈이 되어 나와서 갈피를 못잡겠습니다..스크래핑한 값을 어떻게 저장을하고 넘겨야할지 db로 넘겨야할지 전혀 모르겠습니다................................. 이틀동안 찾아봐도 해결이 안되어서 질문 남깁니다..
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
tfjs-node 안깔려서
tfjs-node 안깔려서 해보라고 하는거 해보다가잘 되던 nodemon server.js 도 안되고 뭐가 잘못됐는지 모르겠습니다.빨리 마무리하고 싶은데 답답하네요강의 업데이트 좀 해주셨으면 좋겠는데 생각 없으신가요
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
route에서 res.status(201).json시 undefined
안녕하세요 선생님게시글 수정을 route에서 처리하고 마지막으로 res.status(201).json(fullPost) 이렇게 게시글 정보를 담아서 보내려는데 자꾸 사가에서 데이터를 undefined로 받습니다..담기 전에 fullPost를 콘솔로 찍어보면 데이터가 잘 들어가 있는데 프론트로 넘어가면 undefined로 바뀌어요.그래서 단순 문자열도 res.status(201).json('성공');이런 식으로 보내봤는데도data가이렇게 undefined로 뜨는건 어느 부분을 봐야 하는 건가요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
배포 강의를 시작하시는 분들은 인스턴스 환경변수 분리까지 보신 후에 하시면 좋을 것 같습니다.
처음에 .env파일을 깃허브에 올리시길래 띠용했지만 곧바로 수정하시는군요.지금은 연습 중이라서 올라가도 크게 문제가 없을 것 같고, 또한, 강사님께서 .env가 깃허브에 올라갔을 때 어떻게 대처하는지 알려주시기 때문에 연습 용도로도 좋아보입니다..env파일을 올리는게 찜찜하신 분들은 인스턴스 환경변수 분리까지 보신 뒤에 하시는게 좋을 것 같고, 나는 .env가 노출 된 상황을 한 번 연습해보고 싶다. 하시는 분들은 차례대로 진행하는 것도 좋을 것 같습니다!
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
const config = require('../config/config')[env];를 es모듈로 불러오는 방법
안녕하세요 자꾸 글 작성했다 지웠다 해서 죄송합니다.직접 검색해보고 해결해보려했는데 안되어서 다시 남깁니다. 7.6장 model/index.js 파일중에서const config = require('../config/config')[env];수업에 나왔던 이 코드와 동일하게 동작하게끔 es모듈 방식으로 import하는 코드를 작성하려 합니다import cfg from '../config/config.json' assert { type : 'json' } const config = cfg[env]; 이렇게 작성해 보았는데(node:10404) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time(Use node --trace-warnings ... to show where the warning was created)이런 경고가 뜨고, 무시하고 app.js를 실행하면 서버가 실행되긴 하는데 책&예제코드에 나오는 메시지와는 다른 아래와 같은 메시지가 나옵니다.Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'users' AND TABLE_SCHEMA = 'nodejs'Executing (default): SHOW INDEX FROM users FROM nodejsExecuting (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'comments' AND TABLE_SCHEMA = 'nodejs'Executing (default): SHOW INDEX FROM comments FROM nodejs 어떻게 해야 es모듈에서도 동일하게 동작하게끔 할 수 있는지 궁금합니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
1:1 관계 등록 API 강의 creatProduct 시 에러가 발생합니다
삽입시 address 값을 입력했는데도 default 값이 설정되어있지 않다고 에러가 뜹니다.
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
flyctl 관련 재문의 드립니다.
flyctl deploy가 진행이 안돼서제 컴퓨터에 있는 도커를 삭제하고 다시 실행했더니아래와 같은 상태에서 멈췄습니다.구글링 해봐도 잘 모르겠어요 ㅠㅠ어떻게 해결하면 될까요? C:\Users\dahye\Documents\react-project\d-market-server>flyctl deploy ==> Verifying app config--> Verified app config==> Building imageRemote builder fly-builder-quiet-sunset-984 ready==> Building image with Buildpacks--> docker host: 20.10.12 linux x86_6420: Pulling from heroku/buildpacksDigest: sha256:1dd1a9c5f291b47fed1aed3f4c348fdc878380319c15f0e09753a5898482554eStatus: Image is up to date for heroku/buildpacks:2020-cnb: Pulling from heroku/herokuDigest: sha256:c9d053a463c7cd81672a3b0d5d5e26bdcbdffe2782565ccbedc15867b8cddfb9Status: Image is up to date for heroku/heroku:20-cnbWarning: Platform requested deprecated API '0.6'===> DETECTINGWarning: Buildpack 'heroku/ruby@0.0.0' requests deprecated API '0.4'Warning: Buildpack 'heroku/python@0.0.0' requests deprecated API '0.4'Warning: Buildpack 'heroku/scala@0.0.0' requests deprecated API '0.4'Warning: Buildpack 'heroku/php@0.0.0' requests deprecated API '0.4'Warning: Buildpack 'heroku/go@0.0.0' requests deprecated API '0.4'Warning: Buildpack 'heroku/gradle@0.0.0' requests deprecated API '0.4'2 of 3 buildpacks participatingheroku/nodejs-engine 0.8.16heroku/nodejs-npm 0.5.2===> ANALYZINGPrevious image with name "registry.fly.io/d-market-server:cache" not found===> RESTORING===> BUILDING[Heroku Node.js Engine Buildpack][Checking Node.js version]Detected Node.js version range: *Resolved Node.js version: 19.7.0[Installing Node.js distribution]Downloading Node.js 19.7.0Extracting Node.js 19.7.0Installing Node.js 19.7.0[INFO] Installing toolbox[INFO] - yj[INFO] Using npm v9.5.0 from Node[INFO] Installing node modules from ./package-lock.jsonnpm WARN config production Use --omit=dev instead.WARN failed to finish build in graphql: Post "https://api.fly.io/graphql": context canceledOops, something went wrong! Could you try that again?
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
flyctl 배포 관련 에러 문의드립니다.
cmd창에서 flyctl deploy를 실행하면 아래와 같은 에러가 뜹니다.도커 빌더 이미지 관련 오류인것 같은데 어떻게 해결해야 하나요?urce: failed to fetch builder image 'index.docker.io/heroku/buildpacks:20': resolve auth for ref index.docker.io/heroku/buildpacks:20: error getting credentials - err: exec: "docker-credential-desktop": executable file not found in %PATH%, out: ``
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
수업 내용에 대해 질문드립니다.
안녕하세요http.createServer(async (req, res) => { try { if (req.method === 'GET') { if (req.url === '/') { const data = await fs.readFile(path.join(__dirname, 'restFront.html')); res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); return res.end(data); } else if (req.url === '/about') { const data = await fs.readFile(path.join(__dirname, 'about.html')); res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); return res.end(data); } else if (req.url === '/users') { res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8' }); return res.end(JSON.stringify(users)); } // /도 /about도 /users도 아니면 try { const data = await fs.readFile(path.join(__dirname, req.url)); return res.end(data); } catch (err) { // 주소에 해당하는 라우트를 못 찾았다는 404 Not Found error 발생 } restFront.js , restFront.css 등을 받아오는 try 부분에서강의에는 const data = await fs.readFile(`.${req.url)`);로 수업하셨는데책과 깃헙예제에는 const data = await fs.readFile(path.join(__dirname, req.url)); 로 되어있어가지구요1. .${req.url}에서 백틱과 .은 꼭 쓰여야 하는건지랑2. 책의 예제코드에서 __dirname의 경로는 restServer.js가 있는 위치가 기준이 되는건지 질문드립니다. else if (req.method === 'POST') { if (req.url === '/user') { let body = ''; // 요청의 body를 stream 형식으로 받음 req.on('data', (data) => { body += data; }); // 요청의 body를 다 받은 후 실행됨 return req.on('end', () => { console.log('POST 본문(Body):', body); const { name } = JSON.parse(body); const id = Date.now(); users[id] = name; res.writeHead(201, { 'Content-Type': 'text/plain; charset=utf-8' }); res.end('등록 성공'); }); } } return req.on('end', () =>{}) 에서 'end'라는 이벤트가 어느 부분에서 발생해서 저기 들어가는건지도 궁금합니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
nest 실행 (npm run start:dev)이 너무 오래 걸려요
typescript 기초 강의에서 nest를 처음 실행했는데 실행 시 너무 오래 걸립니다..(약 20~30분 정도) windows os에서 실행 햇는데 이유가 있을까요?현재 컴퓨터 사양은 Memory 32G 에 RAM 16 Core 입니다.매번 이렇게 시간이 걸리면 현실적으로 test가 불가능해서 방법을 구하고자 합니다. +추가yarn으로 실행해봐도 비슷하네요..Windows OS에서 WSL 통해서 Ubuntu 환경에서 실행하고 있습니다.
-
미해결[리뉴얼] 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 에러 ?로그인 안되는데 찾을수가 없습니다
-
해결됨[리뉴얼] 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와 백엔드 연결에서 문제가 나는 건가요?
-
해결됨탄탄한 백엔드 NestJS, 기초부터 심화까지
이 강의를 들을 때 필요한 언어공부가 있을까요? 추천 부탁드립니다,
제가 백엔드 공부도 처음이고 언어 공부에서도 c 이후로 는 거의 하지 않았습니다. 프로젝트 단계로 넘어가기 전 언어 공부를 해야 더 도움이 될거같은데 typescript 나 자바스크립트를 선행 언어 공부를 한 후에 들어야 도움이 더 잘 될까요? 아니면 공부 없이도 듣기 괜찮을 까요?
-
미해결[리뉴얼] 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 찍어보면 아무것도 출력되는게 없습니다.
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
업로드 후 홈화면에서 이미지가 보이지 않습니다
데이터 베이스에도 기록이 잘 들어가고 사이트 홈화면에도 잘 뜨는데 화면의 이미지가 안뜹니다.uploads파일에도 이미지 다 잘 들어갑니다.인강과 데이터베이스를 비교해봤을 때 경로문제인것같긴한데 어떻게 수정을 해야할까요?근데 DB경로의 역슬래시를 슬래시로 바꾸어도 안뜨고 uploads에는 사진도 잘 들어가고 사진의 경로를 봤을때도 동일해서... 왜 안뜨는걸까요?단순히 한사진의 오류라고생각했었는데 등록한 것 모두 이렇게 되어서...어딜 어떻게 수정해야할지모르겠어서... 일단은 깃허브링크 함께올려봅니다... 홈사이트 화면개발자 툴 상품넣고 난뒤DB데이터 베이스물건 등록 후 vscode에 뜨는것 깃허브 링크: https://github.com/Dalrae03/webstudy/commit/7a5981dafabdbf009b40c0c5814e7e7c6f3ea9dehttps://github.com/Dalrae03/webstudy/commit/c9106654b1d6badba9ae64ce744a11da46b719a5
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
image 파일에서 vscode로 드래그 앤 드롭을 처리할 수 없다고 합니다
압축을 푼뒤 진행해도 에러가 납니다The file is not displayed in the text editor because it is either binary or uses an unsupported text encoding.라고 나오고요 hexeditor를 깔아도 해결이 안됩니다찾아보니 50mb를 넘는 자료를 vs코드에서 지원을 못한다고 하는데요 참고로 집에 컴퓨터가 없어 pc방 컴퓨터로 배우는 중입니다
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
passport.initialize not function 에러 ..
const express = require('express'); const session = require('express-session'); const cookieParser = require('cookie-parser'); const cors = require('cors'); const postRouter = require('./routes/post'); const userRouter = require('./routes/user'); const db = require('./models'); const passport = require('./passport'); const dotenv = require('dotenv'); const passportConfig = require('./passport'); dotenv.config(); const app = express(); db.sequelize.sync() .then(() => { console.log('db 연결 성공'); }) .catch(console.error); passportConfig(); app.use(cors({ origin: '*', credentials: false, })); app.use(express.json()); app.use(express.urlencoded({extended: true})); app.use(session({ saveUninitialized: false, resave: false, secret: process.env.COOKIE_SECRET, })); app.use(cookieParser(process.env.COOKIE_SECRET)); app.use(passport.initialize()); app.use(passport.session()); app.use('/post', postRouter); app.use('/user', userRouter); app.listen(3065, () => { console.log('서버 실행 중...'); }); 5년전 누가 같은 질문을 블로그 댓글로 했었는데 수정했다고만 답변을 달아주셔서 ,, 뭐가 문젠지 잘 모르겠습니다.작성된 코드이고 아래와 같이 에러가 발생합니다. /Users/WebstormProjects/nodebird/prepare/back/app.js:36app.use(passport.initialize()); ^TypeError: passport.initialize is not a function at Object.<anonymous> (/Users/jeondaewon/WebstormProjects/nodebird/prepare/back/app.js:36:18) at Module._compile (node:internal/modules/cjs/loader:1218:14) at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) at Module.load (node:internal/modules/cjs/loader:1081:32) at Module._load (node:internal/modules/cjs/loader:922:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12) at node:internal/main/run_main_module:23:47Node.js v19.3.0[nodemon] app crashed - waiting for file changes before starting...
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
API-Gateway2 섹션 Apollo 서버 구동 에러
Auth와 Resource App 시작 시 아래 사진과 같은 에러가 발생합니다. 강의와 노션에 있는 코드를 그대로 작성했다고 생각하여 패키지 버전 문제로 추정됩니다.현재 제가 사용중인 패키지입니다.강의 중 사용중인 패키지 버전을 공유받고 싶습니다. 해당 오류에 대한 구글링에 실패해서 추가적으로 혹시 알고계신 레퍼런스 있으시면 알려주시면 감사드리겠습니다.