묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨Slack 클론 코딩[백엔드 with NestJS + TypeORM]
이 강의에 관해서 출판 된 책이나 문서 같은 건 없는 건가요?
완강후 실무에 써먹어 보려는 데 종종 다시 찾아봐야 할 때가 있을꺼 같아서요.없어도 크게 불편 할 것은 없습니다.
-
해결됨Slack 클론 코딩[백엔드 with NestJS + TypeORM]
MySQL이 연결되지않습니다
Error: connect ECONNREFUSED ::1:3306at TCPConnectWrap.afterConnect [as oncomplete] 라는 오류가 뜹니다상황설명 : create~~ 가 뜨면서 sleact DB가 만들어졌다가 3306이 이미 써져있어서 그렇다라는 글을 보고 sudo killall mysqld 를 썼다가 DB가 다 날라가고 나서 다시 MySQL을 깔고 db:create, start:dev를 하였더니 똑같이 저런 오류가 뜹니다..import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; import { ConfigModule, ConfigService } from '@nestjs/config'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { LoggerMiddleware } from './middlewares/logger.middlware'; import { UsersModule } from './users/users.module'; import { WorkspacesModule } from './workspaces/workspaces.module'; import { ChannelsModule } from './channels/channels.module'; import { DmsModule } from './dms/dms.module'; import { UsersService } from './users/users.service'; import { TypeOrmModule } from '@nestjs/typeorm'; import { Users } from './entities/Users'; import { WorkspaceMembers } from './entities/WorkspaceMembers'; import { ChannelChats } from './entities/ChannelChats'; import { ChannelMembers } from './entities/ChannelMembers'; import { Channels } from './entities/Channels'; import { DMs } from './entities/DMs'; import { Mentions } from './entities/Mentions'; import { Workspaces } from './entities/Workspaces'; @Module({ imports: [ ConfigModule.forRoot({ isGlobal: true }), UsersModule, WorkspacesModule, ChannelsModule, DmsModule, TypeOrmModule.forRoot({ type: 'mysql', host: 'localhost', port: 3306, username: process.env.DB_USERNAME, password: process.env.DB_PASSWORD, database: process.env.DB_DATABASE, entities: [ ChannelChats, ChannelMembers, Channels, DMs, Mentions, Users, WorkspaceMembers, Workspaces, ], synchronize: true, logging: true, keepConnectionAlive: true, charset: 'utf8mb4_general_ci', }), TypeOrmModule.forFeature([Users]), ], controllers: [AppController], providers: [AppService, ConfigService, UsersService], }) export class AppModule implements NestModule { configure(consumer: MiddlewareConsumer) { consumer.apply(LoggerMiddleware).forRoutes('*'); } } DB_USERNAME=root DB_PASSWORD=저의 비밀번호입력했습니다 DB_DATABASE=sleact PORT=3000
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
value에 관해서 궁금합니다.
안녕하세요 선생님. :-) 코멘트 복습하며 궁금증이 생겨서 질문 드립니다.리팩토링 하면서 느낀건데 , 이 이미지의 밑줄이 그어진 태그들 없이 이벤트핸들러만 있어도 기능구현에 무리가 없던데 이 태그들이 꼭 있어야 하는건가요 ?? 있어야 한다면 이유를 알고 싶습니다. 두 번째는 antd에서 rate를 가져올 때 궁금증입니다.여기서 제가 궁금한것은 value={el.rating}이 부분인데, value값에 el.rating을 주지 않으면 색칠이 없는 별만 뜨더라구요. 그래서 이모션을 없애고 <div>{el.rating}<div>로 찍으니 숫자가 나오는 걸 알 수 있었습니다. 그럼 결국 댓글 작성할 때 클릭한 별은 숫자로 뮤테이션이 날라가고 조회할 때 그 숫자를 value에 넣어줘야 별 모양이 제대로 뜬다는 것을 확인했습니다. 그렇다면 이건 antd 개발자들이 독자적으로 설정을 이렇게 한건가요 ?? 아니면 일반적으로 이런 모양들은 value에 값을 넣어줘야 정상적으로 뜨는건가요 ??? 미리 답변 감사합니다 선생님 !!! ^_^
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
eslintrc.js에서 project를 폴더 안에있는 tsconfig.json으로 설정하는 방법이 있을까요.?
저 같은 경우 codecamp 폴더 안에 class, freeboard, quiz폴더들을 넣고 진행하고 있었는데요... (class와 freeboard에 tsconfig.ts파일을 설정해두었습니다.)class 폴더 안에서 설정해주시는대로 똑같이 lint설정하다가 project부분에서 '**/tsconfig.json'을 하는 순간 rootdir을 못찼겠다는 error가 뜨더라구요. 그래서 여기저기 검색해서 보니까 tsconfig를 못찼는것같아 경로를 '*/class/tsconfig.json'으로 변경하니 뭔가 되는것 같았는데, 이번엔 parsingError가 뜨면서 yarn lint를 하였을때 , 'The Next.js plugin was not detected in your ESLint configuration. ....' 란 경고가 뜨며 lint했을때 틀린 부분들이 나오지 않더라구요.. ㅠㅠ그래서 어쩔수 없이 freeboard폴더 자체를 따로 분리해서 class폴더를 다시 설정하니 잘되는 것을 확인했습니다. 저 같은 경우 다시 freeboard폴더를 codecamp 폴더 안에 넣고 수업을 진행하고 싶은데, class 폴더안의 eslintrc.json파일의 project 경로를 어떻게 설정해주어야 할까요? tsconfig.json파일이 2개가 있는것 자체가 lint에서 문제가 되는 것인가요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
AWS 배포 후 cors 문제
AWS 배포 완료 하였는데 CORS 문제가 발생했습니다..env.production 파일 모두 정상적으로 URL 반영하였는데 왜 안 될까요? 어디를 확인해봐야 할까요?Github 코드 주소https://github.com/zzinbbang/react-reddit-main.env.production 설정에러 상황
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
$를 사용하면 정상적으로 작동하지 않습니다
import { useMutation, gql } from "@apollo/client"; const 나의그래프큐엘셋팅 = gql` mutation createBoard($writer: String, $title: String, $contents: String) { createBoard(writer: $writer, title: $title, contents: $contents) { _id number message } } `; export default function GraphqlMutation() { const [나의함수] = useMutation(나의그래프큐엘셋팅); const onClickSubmit = async () => { const result = await 나의함수({ $: { //$ == variables 로 바꿔도 된다 같은 writer: "훈이", title: "contents", contents: "반갑", }, }); console.log(result); }; return <button onClick={onClickSubmit}>Graphql-API 요청하기</button>; }await 나의함수({ $: ...}) 에서 $를 사용하면 ApolloError: null value in column "writer" of relation "board" violates not-null constraint다음과 같은 에러가 발생하고 variables 로 바꾸면 정상적으로 작동합니다. 어느 부분이 틀렸을까요..?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
errno -4094 의 unknown error 가 종종 뜹니다
npm run dev로 실행시킨 후에 코드 수정 및 자동반영(핫리로드라고 하나요..?)이 잘 되다가어느 순간 이런 에러가 뜹니다. - error [Error: UNKNOWN: unknown error, open 'F:\dev\project\react\node-bird\.next\static\chunks\pages\login.js'] { digest: undefined[Error: UNKNOWN: unknown error, open 'F:\dev\project\react\node-bird\.next\static\chunks\pages\login.js'] { errno: -4094, code: 'UNKNOWN', syscall: 'open', path: 'F:\\dev\\project\\react\\node-bird\\.next\\static\\chunks\\pages\\login.js'} 터미널에서 실행중인 프로세스 종료하고 다시 npm run dev 로 실행시키면 정상동작하기는 합니다만 혹시 에러가 발생하지 않도록 하는 방법이 있을가 해서 문의 남겨봅니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
cors 에러
안녕하세요. 회원가입 페이지 기능 생성중인데 서버 쪽에서 const origin = "http://localhost:3000";app.use(cors({ origin})); 이렇게 클라이언트 포트인 3000포트를 허용해줬습니다. 그런데 회원가입페이지에서 버튼을 누르면 XMLHttpRequest cannot load http://localhost:4000/api/auth/register due to access control checks. 요런식으로 에러남 요런 에러가 나는데 cors가 제대로 안먹히는고 있는건가요?
-
미해결사물인터넷 통신은 내 손에 (Arduino, MQTT, Nodejs, MongoDB, Android,VS Code)
MQTT 도표 관련 논문 인용
안녕하세요. 선생님. 강의 듣고 사물인터넷에 대해 이해가 깊어졌습니다.,다름이 아니고, 빅데이터 아키텍처 논문을 쓰고 있는데, 선생님께서 1강에서 설명하신 MQTT 도표가 저에게 필요해서요.그래도 쓰는것은 아니고, 제가 참조하여 그림과 같이 다시 그렸는데, 논문에 인용해도 될지 문의드립니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
섹션13. 마이크로서비스> Error [ERR_REQUIRE_ESM]
안녕하세요.(2022년도 강의) 섹션13. Microservice - API-Gateway 2 강의에서 질문이 있습니다.Microservice의 Graphql기반의 API 서버를 구성하는 예제에서 Gateway 서버에서 아래와 같은 에러가 발생합니다. (캡쳐 참고)const wrapAnsi = require('wrap-ansi');Error [ERR_REQUIRE_ESM]: require() of ES Module /api-gateway/node_modules/wrap-ansi/index.js from /api-gateway/node_modules/@nestjs/cli/node_modules/inquirer/lib/utils/screen-manager.js not supported.Node모듈에서 import 방식이 아닌 require 를 통해 다른 모듈을 로드해서 오류라는 것 같은데요.이 경우, 어떻게 해야할까요? ㅠ
-
해결됨비전공자를 위한 진짜 입문 올인원 개발 부트캠프
커밋 메시지가 잘 이해 안됩니다
커밋 메시지가 뭔가요?git commit -m "project init" 에서"project init" 대신 다른 것을 써넣어도 작동하나요?"project init" 이 어떤 역할을 하는지 잘 모르겠습니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
npm run dev에서 오류가 납니다
C:\Users\HB\Desktop\fullstack-app\frontend>npm run devnpm ERR! Missing script: "dev"npm ERR!npm ERR! To see a list of scripts, run:npm ERR! npm runnpm ERR! A complete log of this run can be found in: C:\Users\HB\AppData\Local\npm-cache\_logs\2023-08-22T08_50_35_351Z-debug-0.logC:\Users\HB\Desktop\fullstack-app\frontend> 인터넷보고 package.json에 dev설정을 해줘야한다고해서 들어가봤는데 이미 되있더라구요그리고 package.json이 총 2개인게 맞나요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
npm run dev 오류
npm run dev 를 실행했더니[0] Error: listen EADDRINUSE: address already in use :::5000[0] at Server.setupListenHandle [as _listen2] (node:net:1751:16)[0] at listenInCluster (node:net:1799:12)[0] at Server.listen (node:net:1887:7)[0] at Function.listen (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\node_modules\express\lib\application.js:635:24)[0] at Object.<anonymous> (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\server\index.js:58:5)[0] at Module._compile (node:internal/modules/cjs/loader:1256:14)[0] at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)[0] at Module.load (node:internal/modules/cjs/loader:1119:32)[0] at Module._load (node:internal/modules/cjs/loader:960:12)[0] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)[0] at node:internal/main/run_main_module:23:47[0] Emitted 'error' event on Server instance at:[0] at emitErrorNT (node:net:1778:8)[0] at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {[0] code: 'EADDRINUSE',[0] errno: -4091,[0] syscall: 'listen',[0] address: '::',[0] port: 5000[0] }[0][0] Node.js v18.17.1[0] [nodemon] app crashed - waiting for file changes before starting...[1] [HPM] Proxy created: / -> http://localhost:5000[1] i 「wds」: Project is running at http://192.168.123.105/[1] i 「wds」: webpack output is served from[1] i 「wds」: Content not from webpack is served from C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\public[1] i 「wds」: 404s will fallback to /[1] Starting the development server...[1][1] Error: error:0308010C:digital envelope routines::unsupported[1] at new Hash (node:internal/crypto/hash:69:19)[1] at Object.createHash (node:crypto:133:10)[1] at module.exports (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\util\createHash.js:135:53)[1] at NormalModule._initBuildHash (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:417:16)[1] at handleParseError (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:471:10)[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:503:5[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:358:12[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:373:3[1] at iterateNormalLoaders (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:214:10)[1] at iterateNormalLoaders (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:221:10)[1] C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\react-scripts\scripts\start.js:19[1] throw err;[1] ^[1][1] Error: error:0308010C:digital envelope routines::unsupported[1] at new Hash (node:internal/crypto/hash:69:19)[1] at Object.createHash (node:crypto:133:10)[1] at module.exports (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\util\createHash.js:135:53)[1] at NormalModule._initBuildHash (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:417:16)[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:452:10[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:323:13[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:367:11[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:233:18[1] at context.callback (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:111:13)[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\babel-loader\lib\index.js:59:103 {[1] opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],[1] library: 'digital envelope routines',[1] reason: 'unsupported',[1] code: 'ERR_OSSL_EVP_UNSUPPORTED'[1] }[1][1] Node.js v18.17.1[1] npm run start --prefix client exited with code 1이런 오류가 뜹니다.node version 이 맞지 않아 생기는 오류 같은데 확인 부탁드려요ㅠㅠ
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
크롬에서 카카오맵이 정상적으로 그려지지 않습니다.
안녕하세요 강사님! 강의 정말 잘 보고 있습니다. 카카오맵 지도를 띄우는 코드를 작성하는 실습을 하면서 크롬으로 확인을 했는데요,처음에는 아래의 오류가 떠서 구글링 후에 useEffect(() => { window.kakao.maps.load(() => { const container = document.getElementById("map"); // 지도를 담을 영역의 DOM 레퍼런스 const options = { // 지도를 생성할 때 필요한 기본 옵션 center: new window.kakao.maps.LatLng(33.450701, 126.570667), // 지도의 중심좌표. level: 3, // 지도의 레벨(확대, 축소 정도) }; const map = new window.kakao.maps.Map(container, options); // 지도 생성 및 객체 리턴 }); }, []);위의 코드처럼 kakao의 map 객체가 로드되면 실행되게끔 수정을 했습니다. 그 후부터는 위의 오류가 뜨지는 않았지만 한참동안 브라우저 상단 탭에 로딩되는 상태가 보이다가 지도는 결국 보이지 않더라고요. 개발자도구의 네트워크 탭을 보면 아래와 같이 kakao.js를 불러오지 못했다고 오류가 나오는데, 로딩 중에 크롬 콘솔에 window.kakao를 쳐보면 정상적으로 찍힙니다.크롬에서 브라우저 캐시를 삭제하는 방법, 시크릿창에서 해보는 방법, 새 api 키를 발급하는 방법 등등 해보았지만 모두 안됐는데 사파리에서 실행해보니 곧잘 되는걸 확인했습니다... 코드 상의 문제는 아닌 것 같은데 왜 크롬에서만 안되는 건지 혹시 알 수 있을까요..? 구글링하다가 저와 같은 이슈를 겪은 분의 글을 발견했는데, 이슈가 해결은 안됐지만 일단 첨부합니다. https://devtalk.kakao.com/t/kakao-maps-load-net-err-internet-disconnected/125422/4 위의 글 답변에서는 크롬 확장프로그램 문제일 가능성이 있다고 나오는데, 딱히 문제가 될 것 같은 확장프로그램도 없어서요.. 답변 부탁드립니다! 감사합니다!
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
useRef() 사용하고 console.log(state)를 찍어보니 빈객체가 콘솔에 찍힙니다..!
안녕하세요!강의 듣고 복습하면서 콘솔을 찍어 봤는데빈객체가 콘솔에 찍힙니다..이거 안넘어가게 하려는 방법이 있나요...?위와 같이 콘솔이 찍힙니다..ㅠ나머지는 강의 들은 내용과 같이 잘 작동합니다!감사합니다!
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
useCallback 적용 안되는 오류
안녕하세요, 수업 잘 듣고 있습니다:)다름이 아니라, useCallback을 onEdit 함수와 onRemove함수에 적용했는데 계속해서 모든 일기 리스트가 리렌더되는 현상이 발생하여 이유를 묻고 싶습니다 ㅠ 이 코드에 문제점이 있을까요? // 배열 삭제 const onRemove = useCallback((targetId) => { setData((data) => data.filter((it) => it.id !== targetId) ); }, []); // 배열 수정 const onEdit = useCallback((targetId, editContent) => { setData((data) => { return data.map((it) => { if (it.id === targetId) { it.content = editContent; } return it; }); }); }, []);
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
Missing script : "dev"라고 나옵니다. 근데 package.json에 dev가 있거든요..ㅠ
무슨 문제일까요..?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
git ssh 연동해서 remote add origin 정상적으로 됬는데
왜 깃 웹 페이지에서는 자꾸 아무것도 안뜰까요 ?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
모듈이 없다는데요
npm WARN old lockfile npm 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 lockfilenpm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issuenpm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecatednpm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecatednpm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependenciesnpm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecatednpm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecatednpm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated bcrypt@3.0.8: versions < v5.0.0 do not handle NUL in passwords properlynpm WARN deprecated node-pre-gyp@0.14.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the futurenpm ERR! code 1npm ERR! path C:\Users\HB\Downloads\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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=9 --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.17.1 | 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\HB\Downloads\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.17.1 (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.17.1 | 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.17.1 | 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\HB\AppData\Local\Programs\Python\Python39\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\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\HB\AppData\Local\Programs\Python\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\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\HB\AppData\Local\Programs\Python\Python38\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\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\HB\AppData\Local\Programs\Python\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\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\HB\AppData\Local\Programs\Python\Python37\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\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\HB\AppData\Local\Programs\Python\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\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\HB\AppData\Local\Programs\Python\Python36\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\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\HB\AppData\Local\Programs\Python\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:330:47)npm ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:159:21)npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:228:18)npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\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:514: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.19045npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\HB\\Downloads\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\HB\\Downloads\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"npm ERR! gyp ERR! cwd C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! gyp ERR! node -v v18.17.1npm 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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=9 --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\HB\Downloads\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:514: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.19045npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\HB\\Downloads\\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\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! node-pre-gyp ERR! node -v v18.17.1npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0npm ERR! node-pre-gyp ERR! not oknpm ERR! A complete log of this run can be found in: C:\Users\HB\AppData\Local\npm-cache\_logs\2023-08-21T07_28_16_741Z-debug-0.logC:\Users\HB\Downloads\boilerplate-mern-stack-master>npm run dev> react-boiler-plate@1.0.0 dev> concurrently "npm run backend" "npm run start --prefix client"node:internal/modules/cjs/loader:1080 throw err; ^Error: Cannot find module 'C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\concurrently\bin\concurrently.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Module._load (node:internal/modules/cjs/loader:922:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: []}Node.js v18.17.1
-
미해결한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
중첩 Context
강사님 왜 중첩 Context를 사용하는지 이해가 되지 않아 https://www.inflearn.com/questions/800739/context%EC%97%90-%EA%B4%80%ED%95%B4%EC%84%9C-%EC%A7%88%EB%AC%B8%EB%93%9C%EB%A6%BD%EB%8B%88%EB%8B%A4질문에 답변하신 것을 보았습니다제가 이해한 바로는 상위 컴포넌트의 state가 변경되면 Context는 리렌더링 되고 리렌더링 되면서 하위 Context로 전달하려는 객체가 재생성되기 때문에 기존과 다른 prop이 왔다고 인식하여 React.memo를 활용하여 리렌더링을 방지하려 했던 것이 의미 없게 된다 따라서 객체에 useMemo를 활용하여 state가 변경되었을 때 재생성되지 않도록 방지하는 것으로 이해하였습니다. 제가 이해한게 맞나요? 그렇다면 중첩 Context가 아닌 useMemo를 활용하면 해결되는 문제 아닌가요? useMemo를 활용하여 state가 변경되어 컴포넌트가 리렌더링될때 재생성되는거만 방지해줄 수 있지 않나요?