묻고 답해요
131만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨이미지 관리 풀스택(feat. Node.js, React, MongoDB, AWS)
react-router-dom v6 useHistory 이슈
react-router-dom v6 이상에서는 useHistory 대신 useNavigate 를 사용하여야 합니다.v5import { useHistory } from "react-router-dom";const history = useHistory(); history.push("/");v6import { useNavigate } from "react-router-dom";const navigate = useNavigate(); navigate("/");
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
tailwindcss 라이브러리 받은 후 실행이 안됩니다.
npm i -D postcss autoprefixer tailwindnpx tailwindcss init -p 모두 작업을 마치고 /** @type {import('tailwindcss').Config} */ export default { content: [ "./index.html", "./src/**/*.{js,jsx,ts,tsx}" ], theme: { extend: {}, }, plugins: [], } index.css@tailwind base; @tailwind components; @tailwind utilities; npm run dev 를 돌리면,node:internal/process/promises:246triggerUncaughtException(err, true /* fromPromise */);[Failed to load PostCSS config: Failed to load PostCSS config (searchPath: C:/WebStudy/WebDevelement/React/fullstack-react/front): [Error] Loading PostCSS Plugin failed: Cannot find module 'tailwindcss'라는 오류가 뜹니다.원인파악이 어려운데 문의드립니다!
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
Error: Unable to call `followerIdList["includes"]`, which is undefined or falsey
로그인 후 포스팅 하나 작성하면 계속 에러가 발생합니다.exports.renderMain = async (req, res, next) => { try { const posts = await Post.findAll({ include: { model: User, attributes: ['id', 'nick'], }, order: [['createdAt', 'DESC']] // 최신순 정렬(작성일 기준 내림차순) }); res.render('main', { title: 'NodeBird', twits: posts }); } catch (error) { console.error(error); next(error); } };renderMain 메서드에서 따로 follwerIdList를 보내지 않는 것 같은데 {% for twit in twits %} <div class="twit"> <input type="hidden" value="{{twit.User.id}}" class="twit-user-id"> <input type="hidden" value="{{twit.id}}" class="twit-id"> <div class="twit-author">{{twit.User.nick}}</div> {% if not followerIdList.includes(twit.User.id) and twit.User.id !== user.id %} <button class="twit-follow">팔로우하기</button> {% endif %} <div class="twit-content">{{twit.content}}</div> {% if twit.img %} <div class="twit-img"><img src="{{twit.img}}" alt="섬네일"></div> {% endif %} </div> {% endfor %}followerIdList는 어디서 나온 어디서 나온건지 찾을 수가 없습니다..
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
Unkown column 'Post.UserId' in 'field list'
rendermain Executing (default): SELECT `Post`.`id`, `Post`.`content`, `Post`.`img`, `Post`.`createdAt`, `Post`.`updatedAt`, `Post`.`UserId`, `User`.`id` AS `User.id`, `User`.`nick` AS `User.nick` FROM `posts` AS `Post` LEFT OUTER JOIN `users` AS `User` ON `Post`.`UserId` = `User`.`id` AND (`User`.`deletedAt` IS NULL) ORDER BY `Post`.`createdAt` DESC; Error at Query.run (C:\Users\user\study\nodejs\nodebird\node_modules\sequelize\lib\dialects\mysql\query.js:52:25) at C:\Users\user\study\nodejs\nodebird\node_modules\sequelize\lib\sequelize.js:315:28 at processTicksAndRejections (internal/process/task_queues.js:95:5) at async MySQLQueryInterface.select (C:\Users\user\study\nodejs\nodebird\node_modules\sequelize\lib\dialects\abstract\query-interface.js:407:12) at async Function.findAll (C:\Users\user\study\nodejs\nodebird\node_modules\sequelize\lib\model.js:1140:21) at async exports.renderMain (C:\Users\user\study\nodejs\nodebird\controllers\page.js:16:23) { name: 'SequelizeDatabaseError', parent: Error: Unknown column 'Post.UserId' in 'field list' at Packet.asError (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\packets\packet.js:728:17) at Query.execute (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\commands\command.js:29:26) at Connection.handlePacket (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\connection.js:489:32) at PacketParser.onPacket (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\connection.js:94:12) at PacketParser.executeStart (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\packet_parser.js:75:16) at Socket.<anonymous> (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\connection.js:101:25) at Socket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at Socket.Readable.push (internal/streams/readable.js:206:10) { code: 'ER_BAD_FIELD_ERROR', errno: 1054, sqlState: '42S22', sqlMessage: "Unknown column 'Post.UserId' in 'field list'", sql: 'SELECT `Post`.`id`, `Post`.`content`, `Post`.`img`, `Post`.`createdAt`, `Post`.`updatedAt`, `Post`.`UserId`, `User`.`id` AS `User.id`, `User`.`nick` AS `User.nick` FROM `posts` AS `Post` LEFT OUTER JOIN `users` AS `User` ON `Post`.`UserId` = `User`.`id` AND (`User`.`deletedAt` IS NULL) ORDER BY `Post`.`createdAt` DESC;', parameters: undefined }, original: Error: Unknown column 'Post.UserId' in 'field list' at Packet.asError (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\packets\packet.js:728:17) at Query.execute (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\commands\command.js:29:26) at Connection.handlePacket (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\connection.js:489:32) at PacketParser.onPacket (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\connection.js:94:12) at PacketParser.executeStart (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\packet_parser.js:75:16) at Socket.<anonymous> (C:\Users\user\study\nodejs\nodebird\node_modules\mysql2\lib\connection.js:101:25) at Socket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at Socket.Readable.push (internal/streams/readable.js:206:10) { code: 'ER_BAD_FIELD_ERROR', errno: 1054, sqlState: '42S22', sqlMessage: "Unknown column 'Post.UserId' in 'field list'", sql: 'SELECT `Post`.`id`, `Post`.`content`, `Post`.`img`, `Post`.`createdAt`, `Post`.`updatedAt`, `Post`.`UserId`, `User`.`id` AS `User.id`, `User`.`nick` AS `User.nick` FROM `posts` AS `Post` LEFT OUTER JOIN `users` AS `User` ON `Post`.`UserId` = `User`.`id` AND (`User`.`deletedAt` IS NULL) ORDER BY `Post`.`createdAt` DESC;', parameters: undefined }, sql: 'SELECT `Post`.`id`, `Post`.`content`, `Post`.`img`, `Post`.`createdAt`, `Post`.`updatedAt`, `Post`.`UserId`, `User`.`id` AS `User.id`, `User`.`nick` AS `User.nick` FROM `posts` AS `Post` LEFT OUTER JOIN `users` AS `User` ON `Post`.`UserId` = `User`.`id` AND (`User`.`deletedAt` IS NULL) ORDER BY `Post`.`createdAt` DESC;', parameters: {} } GET / 500 25.038 ms - 2481 GET /main.css 200 2.256 ms - 2609 exports.renderMain = async (req, res, next) => { console.log('rendermain') try { const posts = await Post.findAll({ include: { model: User, attributes: ['id', 'nick'], }, order: [['createdAt', 'DESC']] // 최신순 정렬(작성일 기준 내림차순) }); console.log(posts); res.render('main', { title: 'NodeBird', twits: posts }); } catch (error) { console.error(error); next(error); } };안녕하세요 선생님npm run start 서버 띄우고 localhost:8001 로 갔을 때 나오는 에러 입니다.사진도 같이 띄웁니다.controller/page.js 에서 16번째 줄에서 에러가 발생하길래 확인하였는데위 에러 코드에서 보이듯이 sql문에 Post테이블의 UserId 컬럼이 포함되어 있었습니다.Post 테이블 만들 때 UserId 컬럼을 명시한 적이 없는데 왜 sql 문에 포함되었는지 잘 이해가 안 갑니다ㅠㅠ
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
windows에서 nodemon을 통한 app.js 실행 문제
안녕하세요 선생님windows 11 운영체제 플랫폼에서 강의를 수강하고 있습니다.webstorm IDE 사용하고 있습니다.nvm windows를 설치해서 사용 중이며 node 18 lts 버전을 사용 중에 있습니다.npm i nodemon --save-devpackage.json에 devDependencies에 추가한 상태입니다.선생님과 똑같이 cmd 창에서 node app 입력했을 경우 잘 실행이 되었는데요.nodemon app 을 입력했을 경우 다음과 같이 실행할 수 없습니다.C:\Users\mingyo\study\nodejs\nodePractice\express>nodemon app'nodemon'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다.C:\Users\mingyo\study\nodejs\nodePractice\express>nodemon app.js'nodemon'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다.찾아봤을 때는nodemon을 -g 옵션을 줘서 전역으로 설치하는 방법시스템 환경 변수를 수정(?)하는 방법이렇게 크게 두 가지 방법이 있는 것 같았습니다.global 설치는 선생님이 별로 추천하지 않는다고 하셔서 어떤 해결 방법을 사용하는 걸 추천하시는지 궁금합니다.아 그리고 nvm windows를 사용해서 node를 다운받았는데, nvm windows 사용으로 인해 이 문제가 발생한 건지도 궁금합니다.조금 찾아보긴 했는데 이렇게 질문드리는 게 적절한지 잘 모르겠습니다.
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
몽고디비 몽구스와 socket.io를 활용한 실시간 채팅 페이지
안녕하세요.현재 프로젝트 시작했는데 백엔드 배정받아 급하게 강의 결제후 듣고 있습니다.인스타그램 같은 어플을 만들 예정인데, 저는 채팅쪽 파트를 맡게 되었습니다.리액트, node.js mongodb, mongoose를 사용하기로 했으며 제가 구현해야 하는 기능은 이렇습니다.아이디를 검색했을 때 나오는 유저와 채팅하기 버튼을 누르면, 그 유저와 1대1 채팅이 가능하도록 해야합니다. 그리고 채팅 후 방을 둘 다 나가기 하지 않는 이상 채팅방은 계속 유지되어 계속 채팅을 이어나갈 수 있어야 합니다.스키마작성부터 CRUD 코드 작성, 서비스코드 작성, 라우터 코드 작성까지,, 손도 못대겠네요 ㅎㅎ아무리 머리를 쥐어 짜내봐도, 어떻게 구현해야할지 감조차 안잡혀서 유튜브 검색해보면 외국인 강좌들 밖에 안나와서,, 어떻게 해야할까요ㅎㅎfigma는 위와 같습니다.프론트만 해보다 보니 뭘 어떻게 해야할지 모르겠어요,,,ㅠㅠ
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
이미지가 안떠요...
13분 정도까지 했는데 이미지가 안뜨네요... 이유가 무엇인지 아시나요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
model 및 schema 생성하기를 듣고 있는데 질문이 있어요
스키마와 모델을 리액트에서 생성하면몽고db홈페이지에 있는 데이터베이스에도 생성이 되는건가요? 그리고 생성되는것은 어디서 볼 수 있을까요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
npm run dev 실행하고 인증이 안되는거 같아요
해결해보다가 어려워서 포기했어요 ㅜ
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기
npm install 에러 질문드립니다.
2번째 강의 #2 전체적인 틀 만들고 MongoDB 연결파트에서터미널에서 파워셀로 npm install 명령어 실행시 아래와 같은 에러가 발생됩니다. node -v 입력시에 v18.13.0이라고 나오는데 버전 문제인 걸까요? 강의에서는 v10.16.0 으로 나오기는 합니다. 그래서 노드 버전 v10.16.0 으로 낮춰보려고 하는데 node.js페이지에서는 해당 버전은 찾을수가 없네요. 어떻게 해야되나요? 해결 방법 좀 알려주세요. 감사합니다 . --- 아래 ---npm ERR! code 1npm ERR! path C:\Users\YSH\Desktop\코딩\배틀코딩\youtube\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! command failednpm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-buildnpm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\YSH\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\YSH\Desktop\코딩\배틀코딩\youtube\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\YSH\Desktop\코딩\배틀코딩\youtube\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)npm ERR! node-pre-gyp info it worked if it ends with oknpm ERR! node-pre-gyp info using node-pre-gyp@0.14.0npm ERR! node-pre-gyp info using node@18.13.0 | win32 | x64npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https downloadnpm ERR! node-pre-gyp info check checked for "C:\Users\YSH\Desktop\코딩\배틀코딩\youtube\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node" (not found)npm ERR! node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v108-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v108-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v108-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@18.13.0 (node-v108 ABI, unknown) (falling back to source compile with node-gyp)npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v108-win32-x64-unknown.tar.gznpm ERR! gyp info it worked if it ends with oknpm ERR! gyp info using node-gyp@9.3.1npm ERR! gyp info using node@18.13.0 | win32 | x64npm ERR! gyp info oknpm ERR! gyp info it worked if it ends with oknpm ERR! gyp info using node-gyp@9.3.1npm ERR! gyp info using node@18.13.0 | win32 | x64npm ERR! gyp ERR! find Pythonnpm ERR! gyp ERR! find Python Python is not set from command line or npm configurationnpm ERR! gyp ERR! find Python Python is not set from environment variable PYTHONnpm ERR! gyp ERR! find Python checking if "python3" can be usednpm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an errornpm ERR! gyp ERR! find Python checking if "python" can be usednpm ERR! gyp ERR! find Python - "python" is not in PATH or produced an errornpm ERR! gyp ERR! find Python checking if Python is C:\Users\YSH\AppData\Local\Programs\Python\Python39\python.exenpm ERR! gyp ERR! find Python - "C:\Users\YSH\AppData\Local\Programs\Python\Python39\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\YSH\AppData\Local\Programs\Python\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\YSH\AppData\Local\Programs\Python\Python39-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\YSH\AppData\Local\Programs\Python\Python38\python.exenpm ERR! gyp ERR! find Python - "C:\Users\YSH\AppData\Local\Programs\Python\Python38\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\YSH\AppData\Local\Programs\Python\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\YSH\AppData\Local\Programs\Python\Python38-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\YSH\AppData\Local\Programs\Python\Python37\python.exenpm ERR! gyp ERR! find Python - "C:\Users\YSH\AppData\Local\Programs\Python\Python37\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\YSH\AppData\Local\Programs\Python\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\YSH\AppData\Local\Programs\Python\Python37-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\YSH\AppData\Local\Programs\Python\Python36\python.exenpm ERR! gyp ERR! find Python - "C:\Users\YSH\AppData\Local\Programs\Python\Python36\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\YSH\AppData\Local\Programs\Python\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\YSH\AppData\Local\Programs\Python\Python36-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python 3npm ERR! gyp ERR! find Python - "py.exe" is not in PATH or produced an errornpm ERR! gyp ERR! find Pythonnpm ERR! gyp ERR! find Python **********************************************************npm ERR! gyp ERR! find Python You need to install the latest version of Python.npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,npm ERR! gyp ERR! find Python you can try one of the following options:npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)npm ERR! gyp ERR! find Python - Set the environment variable PYTHONnpm ERR! gyp ERR! find Python - Set the npm configuration variable python:npm ERR! gyp ERR! find Python npm config set python "C:\Path\To\python.exe"npm ERR! gyp ERR! find Python For more information consult the documentation at:npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installationnpm ERR! gyp ERR! find Python **********************************************************npm ERR! gyp ERR! find Pythonnpm ERR! gyp ERR! configure errornpm ERR! gyp ERR! stack Error: Could not find any Python installation to usenpm ERR! gyp ERR! stack at PythonFinder.fail (C:\Users\YSH\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:330:47)npm ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Users\YSH\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:159:21)npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\YSH\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:228:18)npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (C:\Users\YSH\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:294:16)npm ERR! gyp ERR! stack at exithandler (node:child_process:427:5)npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:439:5)npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12)npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)npm ERR! gyp ERR! System Windows_NT 10.0.22621npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\YSH\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\YSH\\Desktop\\코딩\\배틀코딩\\youtube\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\YSH\\Desktop\\코딩\\배틀코딩\\youtube\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"npm ERR! gyp ERR! cwd C:\Users\YSH\Desktop\코딩\배틀코딩\youtube\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! gyp ERR! node -v v18.13.0npm ERR! gyp ERR! node-gyp -v v9.3.1npm ERR! gyp ERR! not oknpm ERR! node-pre-gyp ERR! build errornpm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\YSH\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\YSH\Desktop\코딩\배틀코딩\youtube\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\YSH\Desktop\코딩\배틀코딩\youtube\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\YSH\Desktop\코딩\배틀코딩\youtube\boilerplate-mern-stack-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29)npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.22621npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\YSH\\Desktop\\코딩\\배틀코딩\\youtube\\boilerplate-mern-stack-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"npm ERR! node-pre-gyp ERR! cwd C:\Users\YSH\Desktop\코딩\배틀코딩\youtube\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! node-pre-gyp ERR! node -v v18.13.0npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0npm ERR! node-pre-gyp ERR! not ok
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
백그라운드 실행과 스레드 질문
안녕하세요비동기 함수들은 백그라운드로 보내서 실행이 된다고 하셨는데그럼 백그라운드에서 실행되는 애들이 멀티스레드로 실행이 되는건가요?setTimeout, promise를 호출하면 둘 다 백그라운드로 이동하는데여기서 백그라운드 영역은 여러 스레드가 백그라운드로 온 함수들을 동시에 실행하고 태스크 큐로 보내고 이벤트 루프가 호출 스택이 비었을 때 태스크 큐에 작업이 남아있다면 호출스택으로 올려서 작업을 실행하는 것이 맞을까요?감사합니다!
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
cd client에서 npm install 오류
npm WARN old lockfilenpm WARN old lockfile The package-lock.json file was created with an old version of npm,npm WARN old lockfile so supplemental metadata must be fetched from the registry.npm WARN old lockfilenpm WARN old lockfile This is a one-time fix-up, please be patient...npm WARN old lockfile[##################] \ reify:fsevents: sill reify mark deleted [이렇게 뜨는데 어떻게 해결해야하나요?
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
adminjs 라이브러리 문제
안녕하세요.명쾌하고 좋은강의 잘 듣고 있습니다.다름이 아니오라 강사님께서 추천해주신 admin 라이브러리인 adminJS 관련해서 해당패키지를 다움받고나서 모듈자체를 불러올 수 없다는 오류가 계속 생기고 있습니다.공유해주신 깃헙코드 기준으로 거의 똑같이 작성해보았습니다. 하지만pakage.json등에도 모두 잘 기록되어 있는데, 어떤 문제가 있는지 몰라 문의 드립니다. 관련 라이브러리는 nestJS에서 사용이 가능한 상태인가요? nestJS가 버전업되면서 사용할 수 없게 되었는지 궁금합니다.
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
adminjs 라이브러리 문제
안녕하세요.명쾌하고 좋은강의 잘 듣고 있습니다.다름이 아니오라 강사님께서 추천해주신 admin 라이브러리인 adminJS 관련해서 해당패키지를 다움받고나서 모듈자체를 불러올 수 없다는 오류가 계속 생기고 있습니다.pakage.json등에도 모두 잘 기록되어 있는데, 어떤 문제가 있는지 몰라 문의 드립니다. 관련 라이브러리는 nestJS에서 사용이 가능한 상태인가요? nestJS가 버전업되면서 사용할 수 없게 되었는지 궁금합니다.
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
에러처리
에러처리 해줄때 app.js에 에러처리 미들웨어를 해주시는데 꼭 이 방식으로 에러 처리를 해줘야하나요? 아니면 보통 router를타고 특정 함수에서 res.status(405).json(dfsa);이렇게 하나하나 처리해주면 안되나요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기
아예 몽고DB에 연결한다고만 하고 연결이 안되고 있습니다.
> npm run dev > react-boiler-plate@1.0.0 dev > concurrently "npm run backend" "npm run start --prefix client" [1] [1] > client@0.1.0 start [1] > react-scripts start [1] [0] [0] > react-boiler-plate@1.0.0 backend [0] > nodemon server/index.js [0] [1] 'react-scripts'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α�, �Ǵ� [1] ��ġ ������ �ƴմϴ�. [1] npm run start --prefix client exited with code 1 [0] [nodemon] 2.0.22 [0] [nodemon] to restart at any time, enter `rs` [0] [nodemon] watching path(s): *.* [0] [nodemon] watching extensions: js,mjs,json [0] [nodemon] starting `node server/index.js` [0] Server Listening on 5000 [0] (node:9644) [DEP0170] DeprecationWarning: The URL mongodb://hwangjyoung27:tf933725@ac-xjv9w4y-shard-00-02.gefw08m.mongodb.net:27017,ac-xjv9w4y-shard-00-00.gefw08m.mongodb.net:27017,ac-xjv9w4y-shard-00-01.gefw08m.mongodb.net:27017/?authSource=admin&replicaSet=atlas-9r8jq0-shard-0&retryWrites=true&w=majority&ssl=true is invalid. Future versions of Node.js will throw an error. [0] (Use `node --trace-deprecation ...` to show where the warning was created) [0] MongoDB Connected...
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
postgresql 연결 오류
안녕하세요. postgreSQL 셋업 과정 중에서 오류가 발생하여 질문 드립니다.강의대로 pg admin에 연결하면 다음과 같은 오류가 발생합니다.Unable to connect to server: FATAL: password authentication failed for user "mslee"아래 stackoverflow에서 확인한 결과 인증문제 같은데요.pg_hba.config 파일을 수정하면 인증문제를 해결할 수 있다고 해서 시도해봤지만 컨테이너에서 vi, vim으로 config 파일을 수정할 수 없어서 문제를 해결하지 못했습니다.문제 해결에 도움을 요청드립니다!https://stackoverflow.com/questions/7695962/password-authentication-failed-for-user-postgres컨테이너는 잘 띄워진 상태입니다.env파일도 잘 입력되어 있습니다.# app NODE_ENV=development PORT=5000 ADMIN_USER=mslee ADMIN_PASSWORD=1234 SECRET_KEY=sdafasdfasd DB_USERNAME=mslee DB_PASSWORD=1234 DB_HOST=localhost DB_PORT=5433 DB_NAME=inflearn # db POSTGRES_DB=inflearn POSTGRES_USER=mslee POSTGRES_PASSWORD=1234
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
리덕스 부분까지 했는데 Front 화면이 나오지 않아요..
안녕하세요! 강의를 들으면서 React를 공부 중입니다! 다름이 아니라 리덕스 부분까지 진행을 하였는데 에러가 나면서 UI가 보이지 않습니다ㅠㅠ 강의를 몇번 돌려보면서 다른 부분은 없는거 같은데 어떻게 해야할까요..?에러내용소스코드./store/userSlice.jsimport { createSlice } from "@reduxjs/toolkit"; const initalState = { userData: { id: '', email: '', name: '', role: 0, image: '', }, isAuth: false, isLoading: false, error: '' } const userSlice = createSlice({ name: 'user', initalState, reducers: {}, extraReducers: (buider) => { } }) export default userSlice.reducer; ./store/index.jsimport { combineReducers, configureStore } from "@reduxjs/toolkit"; import userReducer from "./userSlice"; import storage from "redux-persist/lib/storage"; import { FLUSH, PAUSE, PERSIST, PURGE, REGISTER, REHYDRATE, persistStore, persistReducer, } from "redux-persist"; const rootReducer = combineReducers({ user: userReducer }) const persistConfig = { key: 'root', storage, }; const persistedReducer = persistReducer(persistConfig, rootReducer); export const store = configureStore({ reducer: persistedReducer, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: { ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER], }, }), }); export const persistor = persistStore(store); ./main.jsximport React from "react"; import ReactDOM from "react-dom/client"; import App from "./App.jsx"; import "./index.css"; import { BrowserRouter } from "react-router-dom"; import { Provider } from "react-redux"; import { store, persistor } from "./store"; import { PersistGate } from "redux-persist/integration/react"; ReactDOM.createRoot(document.getElementById("root")).render( <BrowserRouter> <Provider store={store}> <PersistGate loading={null} persistor={persistor}> <App /> </PersistGate> </Provider> </BrowserRouter> );
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
(req,res,next) -> next()
책에서 프로젝트를 진행하다보면 보통try { }catch(error) {console.error(error);next(error)}로 next(error)를 해주시는데 error가 발생했을때 console.error(error)를 찍고 next(error)에서 에러처리(ex)프로젝트에서 app.use((err, req, res, next) => { res.locals.message = err.message; res.locals.error = process.env.NODE_ENV !== 'production' ? err : {}; res.status(err.status || 500); res.render('error'); });여기로로 보내지는게 맞나요?
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
제로초 슬랙방에 참여가 불가능합니다.
위와 같이 활성 상태가 아니라고만 뜹니다. http://bitly.ws/yCFL이 링크를 통해 들어가려고 시도했습니다.2번째 동영상 강의교안, 깃헙 등 링크모음 강의에 있는 링크 입니다.