묻고 답해요
130만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
npm install이 안됩니다
ilerplate-mern-stack-master\boilerplate-mern-stack-master> npm install 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 chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependenciesnpm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecatednpm 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\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! command failednpm ERR! command C:\Windows\system32\cmd.exe /d /s /c C:\Users\SAMSUNG\AppData\Local\Temp\install-ca11b823.cmdnpm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (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@17.4.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\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\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-v102-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-v102-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-v102-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@17.4.0 (node-v102 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-v102-win32-x64-unknown.tar.gznpm ERR! gyp info it worked if it ends with oknpm ERR! gyp info using node-gyp@9.0.0npm ERR! gyp info using node@17.4.0 | win32 | x64npm ERR! gyp info oknpm ERR! gyp info it worked if it ends with oknpm ERR! gyp info using node-gyp@9.0.0npm ERR! gyp info using node@17.4.0 | win32 | x64npm ERR! gyp info find Python using Python version 3.10.2 found at "C:\Users\SAMSUNG\AppData\Local\Programs\Python\Python310\python.exe" npm ERR! gyp ERR! find VSnpm ERR! gyp ERR! find VS msvs_version not set from command line or npm confignpm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Promptnpm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more detailsnpm ERR! gyp ERR! find VS looking for Visual Studio 2015npm ERR! gyp ERR! find VS - not foundnpm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8npm ERR! gyp ERR! find VSnpm ERR! gyp ERR! find VS **************************************************************npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studionpm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.npm ERR! gyp ERR! find VS For more information consult the documentation at:npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windowsnpm ERR! gyp ERR! find VS **************************************************************npm ERR! gyp ERR! find VSnpm ERR! gyp ERR! configure errornpm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to usenpm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16 npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14 npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16 npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7npm ERR! gyp ERR! stack at C:\Users\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)npm ERR! gyp ERR! System Windows_NT 10.0.19044npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\SAMSUNG\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\SAMSUNG\\OneDrive\\바탕 화면\\PersonalProjects\\WebProjects\\boilerplate-mern-stack-master\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\SAMSUNG\\OneDrive\\바탕 화면\\PersonalProjects\\WebProjects\\boilerplate-mern-stack-master\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102"npm ERR! gyp ERR! cwd C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! gyp ERR! node -v v17.4.0npm ERR! gyp ERR! node-gyp -v v9.0.0npm 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\SAMSUNG\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\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:520:28)npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19044npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\SAMSUNG\\OneDrive\\바탕 화면\\PersonalProjects\\WebProjects\\boilerplate-mern-stack-master\\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\SAMSUNG\OneDrive\바탕 화면\PersonalProjects\WebProjects\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! node-pre-gyp ERR! node -v v17.4.0npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0npm ERR! node-pre-gyp ERR! not ok npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\SAMSUNG\AppData\Local\npm-cache\_logs\2022-08-08T08_26_57_475Z-debug-0.log vscode는 최신버전을 사용중이고 node -v v17.4.0 npm -v 8.16.0 를 사용하고 있습니다.
-
미해결프론트엔드 개발환경의 이해와 실습 (webpack, babel, eslint..)
강의 잘 들었습니다. 감사합니다!
안녕하세요. 진행하신 강의는 웹팩4이므로 저는 웹팩5로 진행하면서 정말 많은 공부가 되었습니다! 한 가지만 빼고 강의 코드를 웹팩5으로 변환시키는 것을 성공하였는데요. BannerPlugin을 사용하기 전에 직접 번들링 코드에 배너를 넣는 부분은 실패했습니다ㅠ 웹팩5에서는 더 이상 assets['main'js].source 함수를 사용하지 않는 것 같았습니다. 해당 함수를 재정의해봤지만 배너가 붙지 않더라구요. 공식문서를 뒤져보면서 이것저것 시도해봤지만 성공하지 못했습니다ㅠ 혹시 여기에 대한 해답이 있으시다면 공유 가능할까요?
-
미해결코로나맵 개발자와 함께하는 지도서비스 만들기 1
Places 코드가 안돼요.
let ps = new naver.maps.service.Piaces(); Places(); 이부분이 안돼요. 검색 기능이 안되요. ㅠㅠ 도와주세요. <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" /> <title>myfirstmap</title> <link rel="stylesheet" href="/stylesheets/style.css" /> <script type="text/javascript" src="https://openapi.map.naver.com/openapi/v3/maps.js?ncpClientId=x8m68jepl8" ></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous" ></script> <script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=08431822c52c7e66355e30a38ecf97bc&libraries=services" ></script> </head> <body> <div id="navbar">myfirstmap</div> <div id="infoBox"> <div id="infoTitle">현재날짜</div> <div id="infoConent">2022.08.10</div> </div> <div id="search"> <input id="search_input" placeholder="목적지를 입력해주세요" /> <button id="search_button">검색</button> </div> <div id="current">현재 위치</div> <div id="map" style="width: 100%; height: 100vh"></div> <script type="text/javascript" src="/data/data.js"></script> <script> var mapOptions = { center: new naver.maps.LatLng(37.3595704, 127.105399), zoom: 10, }; var map = new naver.maps.Map("map", mapOptions); var markerList = []; var infowindowList = []; for (var i in data) { var target = data[i]; var latlng = new naver.maps.LatLng(target.lat, target.lng); marker = new naver.maps.Marker({ map: map, position: latlng, icon: { content: "<div class='marker'></div>", anchor: new naver.maps.Point(12, 12), }, }); var content = `<div class='infowindow_wrap'> <div class='infowindow_title'>${target.title}</div> <div class='infowindow_content'>${target.content}</div> <div class='infowindow_date'>${target.date}</div> </div>`; var infowindow = new naver.maps.InfoWindow({ content: content, backgroundColor: "#00ff0000", borderColor: "#00ff0000", anchorSize: new naver.maps.Size(0, 0), }); markerList.push(marker); infowindowList.push(infowindow); } for (var i = 0, ii = markerList.length; i < ii; i++) { naver.maps.Event.addListener(map, "click", ClickMap(i)); naver.maps.Event.addListener( markerList[i], "click", getClickHandler(i) ); } function ClickMap(i) { return function () { var InfoWindow = infowindowList[i]; infowindow.close(); }; } function getClickHandler(i) { return function () { var marker = markerList[i]; var InfoWindow = infowindowList[i]; if (infowindow.getMap()) { infowindow.close(); } else { infowindow.open(map, marker); } }; } let currentUse = true; $("#current").click(() => { if ("geolocation" in navigator) { navigator.geolocation.getCurrentPosition(function (position) { const lat = position.coords.latitude; const lng = position.coords.longitude; const latlng = new naver.maps.LatLng(lat, lng); if (currentUse) { marker = new naver.maps.Marker({ map: map, position: latlng, icon: { content: '<img class="pulse" draggable="false" unselectable="on" src="https://myfirstmap.s3.ap-northeast-2.amazonaws.com/circle.png" >', anchor: new naver.maps.Point(11, 11), }, }); currentUse = false; } map.setZoom(14, false); map.panTo(latlng); }); } else { alert("위치정보 사용 불가능"); } }); let ps = new kakao.maps.services.Places(); $("#search_input").on("keydown", function (e) { if (e.keyCode === 13) { let content = $(this).val(); ps.keywordSearch(content, placeSearchCB); } }); function placeSearchCB(data, status, pagination) { if (status === kakao.maps.services.Status.OK) { let target = data[0]; const lat = target.y; const lng = target.x; const latlng = new naver.maps.LatLng(lat, lng); marker = new naver.maps.Marker({ position: latlng, map: map, }); } else { alert("검색결과가 없습니다."); } } </script> </body> </html>
-
해결됨따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
혹시 git add . 하고나서 바로 git push하면 안될까요?
부탁드려요!~
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
jwt passport 질문입니다
2종류의 user테이블a_user, b_user 테이블을 가지고 있는데 각 유저테이블에 대해 jwt 검증을 나눠서 하고싶은데..아무리해도 안되는데 팁이 있을까요
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
안녕하세요! useParams에서 막혀서 질문 남깁니다 ㅠㅠ
우선 웹라이브러리 파트의 Link태그 적용 강의에서 후반부에 useParams 를 사용하게 되는데, 이부분부터 무언가 오류가 발생하네요.. 1. 메인화면 들어갔을때 오류화면 2. 상품클릭했을때 콘솔로그 상품을 클릭했을때 변경된 주소까지는잘 적용 되고, useParams 를 사용하기 전까지는 정상 작동 했는데, product 폴더의 index.js 에 useParams 만 넣으면 위처럼 오류가 발생합니다 이전에 소스에서는 문제가 안생겼군요 ㅠㅠ import { useParams } from "react-router-dom"; function ProductPage() { const { id } = useParams(); return <h1>상품 상세 페이지 {id} 상품</h1>; } export default ProductPage; 오타가 있나 싶어서 소스자료 복붙해도 마찮가지여서 문의로 남깁니다... react-router-dom 설치 할때 버전을 확인 못하고 그냥 설치했다가 나중에 확인해서 5.2 버전으로 다시 설치했는데, package.json 에는 5.2버전으로 정상적으로 보여지긴 하는데 오류내용이 버전이 충돌이 나서 그런건가 싶기도 하고.. 해결 방법이 있을까요? ㅠㅠ
-
미해결
node.js powerShell 실행
vs 깔아서 nodejs 실행 하려고 npx 만드려고 하는데 거부되었다고 합니다
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
에러가 납니다ㅜㅜ
강의를 보며 그대로 따라했는데 const query = req.query; console.log("QUERY : ", query); 를 추가했을때 터미널에 node server.js를 하면 에러가 납니다ㅜㅜ
-
미해결[2024] 한입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
선생님 안녕하세요. 렌더링 질문있습니다.
Counter 함수를 정의하고 상태가 변화하면서 리렌더링 되는지 확인하려고 console을 찍어봤는데 영상과 다르게 두 번 찍히더라구요. App.js에서 Counter 컴포넌트를 두 번 정의하지도 않았는데 console이 두 번 찍히는 경우는 어떤게 잘못된걸까요? 소스 코드는 선생님과 동일합니다.
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
cat repository에서의 오류
async existsByEmail(email: string): Promise<boolean> { try { const result = await this.catModel.exists({ email }); return result; } catch (error) { throw new HttpException('db error', 400); } } 에서 return result부분에서 오류가 발생합니다. src/cats/cats.repository.ts:20:7 - error TS2322: Type 'Pick<Document<Cat, any, any>, "_id">' is not assignable to type 'boolean'. 20 return result; ~~~~~~~~~~~~~~exists() 따라가 보면 리턴타입이 boolean이 아닌거 같은데 어떤 부분을 확인해 보면 좋을까요? console.log로 result를 찍어보면 { _id: new ObjectId~~~} 가 나옵니다.
-
미해결Slack 클론 코딩[백엔드 with NestJS + TypeORM]
제로초님 질문드리고싶습니다. 이런문제는 왜발생한건지 파일 캡쳐합니다 도저히 이해가 안돼네요 undefined property verify
import { Injectable, ExecutionContext, HttpException, HttpStatus, } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; import { JwtService } from '@nestjs/jwt'; @Injectable() export class JwtAuthGuard extends AuthGuard('jwt') { constructor( private readonly jwtService: JwtService, // @Inject(forwardRef(() => AdminsService)) // private readonly adminsService: AdminsService, ) { super(); } canActivate(context: ExecutionContext) { const request = context.switchToHttp().getRequest(); const { authorization } = request.headers; if (authorization === undefined) { throw new HttpException('Token 전송 안됨', HttpStatus.UNAUTHORIZED); } //const token = authorization.replace('Bearer ', authorization); const token = authorization.replace('Bearer ', ''); //console.log(token, 'token!!!'); request.user = this.validateToken(token); return true; } validateToken(token: string) { const secretKey = process.env.SECRET ? process.env.SECRET : 'dev'; try { const data = this.jwtService.verify(token, { secret: secretKey, }); console.log(data, '11번가데이터'); return data; } catch (e) { switch (e.message) { // 토큰에 대한 오류를 판단합니다. case 'INVALID_TOKEN': case 'TOKEN_IS_ARRAY': case 'NO_USER': throw new HttpException('유효하지 않은 토큰입니다.', 401); case 'EXPIRED_TOKEN': throw new HttpException('토큰이 만료되었습니다.', 410); default: console.trace(e); // console.log('광섭짱과 함께하는 코딩공부',) throw new HttpException('서버 오류입니다.', 500); } } } } 이부분은 jwt.guard.ts 입니다 저 빨간줄에서 Trace: TypeError: Cannot read properties of undefined (reading 'verify') 이렇게 나오는데 왜 저렇게 나오는건지 도저히 모르겠네요 해당 토큰값도 잘 받아와서 verify 를 이용해 토큰 유효성 검사를 진행하려하는데 그부분에서 에러가 계속 납니다... 도와주세요
-
미해결[2024] 한입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
useMemo와 useEffect 차이
useMemo 강의 잘 듣고 있습니다. 그런데, useMemo(() => { //생략 }, [data.length]); 한 것과 useEffect(() => { //생략 }, [data.length]); 한 것과 차이가 있을까요? 제가 생각했을때는 둘이 같이 작동할 것 같은데.. 어떻나요?
-
미해결[2024] 한입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
dataId = useRef(0) 질문입니다.
const dataId = useRef(0) 질문입니다. 강의 들을 때는 그냥 음~ 하면서 들었는데 나중에 생각해보니.. 왜 useRef를 쓰는 건지 잘 모르겠습니다. 그냥 const [dataId, setDataId] = useState(0); 해도 문제 없을 것 같은데.. 어떨까요??
-
미해결mongoDB 기초부터 실무까지(feat. Node.js)
faker2를 통해 blog. comment 생성 시도시의 오류
Error: Blog validation failed: comments.blog: Path `comments.blog` is required., comments.user: Path `comments.user` is required., comments.content: Path `comments.content` is required. at ValidationError.inspect (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/error/validation.js:48:26) at formatValue (node:internal/util/inspect:782:19) at inspect (node:internal/util/inspect:347:10) at formatWithOptionsInternal (node:internal/util/inspect:2167:40) at formatWithOptions (node:internal/util/inspect:2029:10) at console.value (node:internal/console/constructor:324:14) at console.log (node:internal/console/constructor:360:61) at /Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/src/routes/blogRoute.js:26:13 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { errors: { 'comments.blog': ValidatorError: Path `comments.blog` is required. at validate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1330:13) at SchemaType.doValidate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1314:7) at /Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/document.js:2762:18 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { properties: [Object], kind: 'required', path: 'comments.blog', value: undefined, reason: undefined, [Symbol(mongoose:validatorError)]: true }, 'comments.user': ValidatorError: Path `comments.user` is required. at validate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1330:13) at SchemaType.doValidate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1314:7) at /Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/document.js:2762:18 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { properties: [Object], kind: 'required', path: 'comments.user', value: undefined, reason: undefined, [Symbol(mongoose:validatorError)]: true }, 'comments.content': ValidatorError: Path `comments.content` is required. at validate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1330:13) at SchemaType.doValidate (/Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/schematype.js:1314:7) at /Users/yungsu2391naver.com/Desktop/mongodb_nodejs tutorial/inflearn_nodejs-mongodb/node_modules/mongoose/lib/document.js:2762:18 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { properties: [Object], kind: 'required', path: 'comments.content', value: undefined, reason: undefined, [Symbol(mongoose:validatorError)]: true } }, _message: 'Blog validation failed' }
-
미해결프론트엔드 개발환경의 이해와 실습 (webpack, babel, eslint..)
csp 오류
안녕하세요, htmlWebpackPlugin 관련 질문이 있어서 글 남깁니다. 현재 webpack5, htmlWebpackPlugin5 를 사용해서 예제를 진행하고 있는데, 위와 같은 csp 오류가 발생해서 질문드립니다.
-
해결됨탄탄한 백엔드 NestJS, 기초부터 심화까지
PositiveIntPipe 생성할때 @Injectable() 사용한 이유
안녕하세요! 강의 잘듣고있습니다.!! PositiveIntPipe pipe를 만들때도 의존성 주입을 해야하기 때문에 @Injectable()를 사용하신건가요?? 만약 맞다면 사용한 이유가 궁금합니다.!!( @Injectable 를빼도 작동이 잘되고 파이프도 의존성을 주입해야하나? 라는 궁금증이 있어서 남깁니다!) 감사합니다!
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
mongodb 연결 불가 문제
안녕하세요. .env에 MONGODB_URI를 못 읽어서 계속 mongodb connect 실패가 발생하고 있습니다. 혹시나 하여 app.modules.ts 에서 @Modules 앞 뒤로 MONGODB_URI를 콘솔로 찍어봤는데 @Modules 전에는 값이 안나오고 이후에는 잘 출력되는데요. 혹시 추가로 확인해야할 부분이 있을까요? 감사합니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
proxy 에러
22강을 들으면서 하고 있다가 에러났는데 다른걸 다 수정해봐도 이런 에러가 뜨는 이유는 무엇일까요ㅜㅜㅜ setupProxy코드도 업데이트 된 코드 썼고 package.json에 proxy URL 추가해보고 밑에 저랑 같은 에러 나신 분들 좀 계신 거 같아서 밑에 있는 해결방식 다 따라해봤는데도 여전히 이 에러가 나오네용,,,,,,,,
-
미해결[2024] 한입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
페이지 구현 - 일기 쓰기
안녕하세요! 강의 잘 듣고 있었는데요 저도 윗 분들 처럼 일기 작성 후에 네비게이트로 페이지 이동까지는 되는데 작성한게 업데이트가 안됩니다 ㅠㅠ https://codesandbox.io/s/blazing-sun-kyl8yt?file=/src/components/EmotionItem.js
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
리액트의 기초 동작중 props로 값전달이 궁금합니다
부모컴포넌트에서 리덕스를 사용하지않고 props로 값을 전달할때에 자식 컴포넌트에서 props.state를 사용하여 앞에 프롭스를 항상붙여 써도 동작하는경우가있고 프롭스 없이 state를 바로사용할수있는경우가 있는데 어떤 차이가있고 어떤걸 사용해야하는지 궁금합니다 만약 프롭스를 붙이지않고 정상적으로 동작하여도 props. 형태를 매번 사용하는것이 좋을까요? 아래는 예시 상황입니다 // 부모에게서 randomstate 를 전달받아 바로 사용하는 자식컴포넌트 const Child1 = ( randomstate ) => { console.log(randomstate); return 자식 컴포넌트 ; }; ... // props를 매번 이용하여 사용하는 컴포넌트 const Child2 = ( props, randomstate ) => { console.log(props.randomstate); return 자식 컴포넌트 ; }; ...