33,000원
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
부모 컴포넌트로 state 값을 업데이트 할 때
안녕하세요 강사님! 강의를 계속 듣다가 부모 컴포넌트에 state 를 업데이트 하는 방식에 대해 궁금한 점이 생겼습니다. 예를 들면 아래 링크 예제처럼, 부모 컴포넌트에서 setState 를 처리할 수 있도록 해놓고 props 를 통해 자식 컴포넌트에 전달한 function 으로 event.target.value 를 받으면 더 깔끔하다는 생각이 드는데요. 자식 컴포넌트에서 state 를 따로 만든 다음에 그 값을 부모 컴포넌트로 올리시는 특별한 이유가 있는 건가요? https://webomnizz.com/change-parent-component-state-from-child-using-hooks-in-react/ 감사합니다!
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
몽고 디비 연결 에러 때문에 그런데 한번 봐주시면 감사여
npm i 로 모듈 다 설치하고 몽고 디비 접속정보 config/dev.js 에 설정한 후 npm run dev 로 접속하면 아래처럼 출력됩니다. 그리고 이전 보일러 플레잇 강좌에서 사용했던 몽고 디비 접속 주소를 사용해도 아래처럼 에러 메세지가 출력됩니다. [0] MongooseError: Operation `users.findOne()` buffering timed out after 10000ms [0] at Timeout.<anonymous> (C:\boilerplate-mern-stack\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:185:20) [0] at listOnTimeout (internal/timers.js:549:17) [0] at processTimers (internal/timers.js:492:7) 한번 봐주시면 감사여 그리고 에러의 원인을 알려주시면 감사여
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
질문이있습니다.
저희가 지금 multer로 이미지를 업데이트하고, uploads폴더에 넣어주는데, 이걸 프론트에서 response객체로 받아서, 사용하고 있잖아요. 그런데, image를 올리는 과정이 실제로는 "올리기(확인, 글쓰기)" 버튼을 누른 뒤에 올리게 되는데요. 완료 버튼을 누르기 전에도 이미지 업로드는 계속 uploads파일에 되고 있습니다. 이런 경우에, 스토리지 낭비가 심할 것 같은데, 실제로 올리지 않은 이미지들은 어떻게 계속 삭제되게 할 수 있을까요?..
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
findArgs 가 string 으로 오는 문제
안녕하세요 강사님! 프론트앤드에서 filters 라는 값을 보낼 때 해당 값을 console.log 하면 object 라고 나오는데요 Express에서 받아온 filters 값의 type 을 확인해 보면 string 이라고 나오는 문제가 있습니다. 그래서 for loop 을 돌리면 아래와 같은 결과가 나오고 있습니다. JSON.parse() 를 사용해 봤는데 에러가 나서 진행이 되질 않는 상황입니다. 혹시 이 문제는 어떻게 해결할 수 있을까요? 참고로 저는 아래와 같은 방법으로 데이터를 보내고 있습니다. axios.get(`/api/products/list?page=${pageNumber}&filters=${newFilters}` 감사합니다.
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
쇼핑 정보 업로드시 Images가 if문에서 걸러지지 않는 오류
if(!Title || !Description || !Price || !Continent || !Images){ return alert("빈 칸에 정보를 입력해야 합니다.") } 예전에 강의를 듣고 다 만들어놓고 오늘 검토해보는데 업로드 페이지에서 다른 빈 값들은 다 채우고 나서 일부러 이미지를 드랍다운 하지 않고 업로드 버튼을 누르면 업로드가 되버리는 것을 발견했네요. 분명 if문에는 !Images을 설정해놓았는데 혼자서만 발동을 못하네요. 무슨 문제가 있을까요. 혹시 내가 잘못했나 싶어 강사님이 올려주신 git 파일 쇼핑몰에서도 해봤는데 같은 형상을 보이는 듯 합니다.
- 해결됨따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
userData 내부값 읽어오기_leftmenu
안녕하세요 제가 rightmenu에서 유저데이터 값이 있을 때 mypage,logout과 같은 특정 메뉴가 보이게 하는 것처럼 계정에 role을 부여해서 계정마다 볼 수 있는 leftmenu를 변경하려고 하는데요, 예를들어 auth=0 학생, auth=1 교사 여서 (user.userData.auth==1) 이런식으로 해서 아예 보이는 메뉴를 구분하려고 하는데userData 내부값을 읽으려고 하면 typeError가 납니다. 어떻게 해야 내부 값을 읽어서 메뉴를 구분할 수 있을까요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
onClick 관련 질문
<div onClick={deleteHandler(image)} key={index}> 강사님과 살짝 다른 방법으로 이렇게 onClick을 설정하니 엉뚱하게도 dropHandler 에서 설정한 setImages 가 실행이 되지 않는 문제가 있습니다. <div onClick={() => deleteHandler(image)} key={index}> 이 경우에는 문제없이 잘 작동하는데 무슨 차이가 있는 건가요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
success가 안뜨네요 ㅠㅠ 도와주세요
안녕하세요 이제 거의 다 만들었는데 결제 이후에 success가 안뜨고 이렇게만 뜨네요 제품은 사라지는데요 ㅠㅠ 에러 사항으로 보면 이렇게 뜨는데요 user.js에 들어가서 확인해본 결과 let products = []; doc.product.forEach((item) => { products.push({ id: item.id, quantity: item.quantity }); }); 이 부분 입니다. 선생님꺼랑 비교해본 결과 같게 했는데 뭐가 문제일까요ㅠㅠ
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
업로드 된 이미지 사진이 깨져서 보입니다.
코드자체에선 에러도 없는것같고, 이미지 업로드와 삭제 모두 작동자체는 잘 되는 것 같은데, 이미지가 보이지 않고 깨짐 표시만 보입니다. 왜 이러는 건지 이유를 알 수 있을끼요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
선생님.. 디비 연결할때요
저는 cluster말고 mongodb compass에서 연결할건데요 이런식으로 되어있을경우 module.exports = { mongoURI: 'mongodb://root:******@localhost:27017/?authSource=admin&readPreference=primary&appname=MongoDB%20Compass&ssl=false' } 이렇게 연결을 시도햇는데 안되더라구요 이런 에러가 뜹니다어떻게 연결해야할까요??
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
rendering 영역의 <div>와 return 영역의 <div> 차이 질문드립니다
선생님 안녕하세요 완강하고 선생님과 진행한 쇼핑몰에 개인적으로 기능을 더하는 중인데 궁금한 부분이 생겼습니다 서치를 해봤는데 제가 원하는 답변을 찾을 수가 없어서 이렇게 질문드립니다 ① ... const Tab = () => ( <Tabs type="card" activeKey={ActiveTab} onChange={onChange}> <TabPane tab="배송지 선택" key="1"> <div> ... </div> </TabPane> <TabPane tab="신규입력" key="2" forceRender="true"> <div> <RecipientDiv> <Input placeholder="수령인" value={Recipient} onChange={onRecipientChange} /> <Input placeholder="'-'를 제외하고 입력해 주세요" value={PhoneNumber} onChange={onPhoneChange} /> </RecipientDiv> <PostcodeDiv> <div> <Input placeholder="우편번호" value={Postcode} readOnly /> <Button onClick={showModal} size="default">주소 찾기</Button> </div> <Modal title="Basic Modal" visible={ShowModal} onOk={closeModal} onCancel={closeModal}> <DaumPostcode onComplete={handleComplete} /> </Modal> <Input placeholder="주소" value={Address} readOnly/> </PostcodeDiv> <Input placeholder="상세주소" value={DetailAddress} onChange={onAddressChange} /> <Checkbox onChange={onCheckChange} checked={Check}>배송지 목록에 추가</Checkbox> </div> </TabPane> </Tabs> ); } return ( <div> <Tab /> </div> ) ② return ( <div> <Tabs type="card" activeKey={ActiveTab} onChange={onChange}> <TabPane tab="배송지 선택" key="1"> <div> ... </div> </TabPane> <TabPane tab="신규입력" key="2" forceRender="true"> <div> <RecipientDiv> <Input placeholder="수령인" value={Recipient} onChange={onRecipientChange} /> <Input placeholder="'-'를 제외하고 입력해 주세요" value={PhoneNumber} onChange={onPhoneChange} /> </RecipientDiv> <PostcodeDiv> <div> <Input placeholder="우편번호" value={Postcode} readOnly /> <Button onClick={showModal} size="default">주소 찾기</Button> </div> <Modal title="Basic Modal" visible={ShowModal} onOk={closeModal} onCancel={closeModal}> <DaumPostcode onComplete={handleComplete} /> </Modal> <Input placeholder="주소" value={Address} readOnly/> </PostcodeDiv> <Input placeholder="상세주소" value={DetailAddress} onChange={onAddressChange} /> <Checkbox onChange={onCheckChange} checked={Check}>배송지 목록에 추가</Checkbox> </div> </TabPane> </Tabs> </div> ) ①로 했을 때는 위 gif에서처럼 TabPane 내에 있는 Input에서 onChange가 발생하면 Input에서 포커스가 아웃됩니다 Tab을 다시 렌더링하는 느낌입니다...! ②로 수정했더니 이 문제가 해결됐고 ①에서 <Tab />을 {Tab()}으로 수정하니 해결됐습니다 ①에서 문제가 발생한 이유와 ①과 ②의 차이를 알고 싶습니다ㅠㅠ 답변 기다리겠습니다 선생님
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
이 강의에 상관없는 질문이지만 강사님한테 직접 여쭤볼 곳이 여기 밖에 없네요..ㅎ
안녕하세요 강사님이 올려주신 강의를 정말 잘 듣고 열심히 공부 중입니다, 다름이 아니라 강사님 강의 중에 TDD 강의가 있다는 걸 알게 되었습니다. 제가 사실 개인 프로젝트에 TDD을 적용할 계획인데 강사님이 올려주신 TDD 강의가 Node.js에 jest을 이용한 것처럼 보이는데요 제가 아직 TDD의 개념을 기본도 거의 없어서 제가 지금 진행 중인 react+express+mongoDB을 이용하고 있는 프로젝트에 강사님의 TDD 강의를 듣고 react에서도 jest을 활용할 수 있을지 확실치가 않네요. 혹시 TDD에 대한 조언 한 번 부탁드려도 될까요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
안녕하세요 강사님 헤로쿠 배포에 관해서 질문드려요ㅠㅠ
안녕하세요 강사님 취업준비를 하며 boiler-plate -> 유튜브 -> 쇼핑몰 까지 모두 완강하고 개인프로젝트를 한개 만들어 유튜브의 강사님 헤로쿠배포강의를 듣고 따라 배포했는데 배포도 완료되었고 로그를 보면 오류로그도 없이 잘 배포된거같은데 앱 도메인을 열어보면 hello world만 뜨네요 제가 초보라 아무리 뒤져보고 오류를 잡아내려해도 답이안나와서 지금 답없이 시간만 가고있는데 ㅠㅠㅠ 질문 드려도될까요... 혹시나 싶어 깃헙주소도 올려놓을게요.. https://github.com/bis92/LifeScheduler 읽어주셔서 감사합니다
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
mongodb 문제
안녕하세요 여기 강의까지 다 잘 따라고 있었는데 어느 부분에서 틀렸는지 잘 되던 갑자기 로그인도 안됩니다... 에러 사항으로는 이렇게 뜹니다 보니깐 mongodb쪽 문제 같은데 지금까지 로그인도 잘 돌아갔는데 갑자기 왜 그런걸까요?ㅠㅠ 어디가 문제인지 모르겠어요....
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
파이썬오류 gyp ERR! find Python
구글링해서 제가 해결해보려고했봤습니다만.... 저에게 맞지않은 npm까지 설치하고 하니까 다른 리액트프로젝트들까지 작동이 안되는 상황까지갔어서 차라리 강사님 답변을 기다리기로했습니다 파이썬 오류가떠서 저아래있는 툴설치해도 똑같습니다ㅠㅠ npm --add-python-to-path='true' --debug install --global windows-build-tools 아래 에러메세지 PS C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master> npm install > bcrypt@3.0.8 install C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt > node-pre-gyp install --fallback-to-build node-pre-gyp WARN Using needle for node-pre-gyp https download 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-v83-win32-x64-unknown.tar.gz node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@14.16.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python checking if "python2" can be used gyp ERR! find Python - "python2" is not in PATH or produced an error gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python checking if the py launcher can be used to find Python 2 gyp ERR! find Python - "py.exe" is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - "C:\Python27\python.exe" could not be run gyp ERR! find Python checking if Python is C:\Python37\python.exe gyp ERR! find Python - "C:\Python37\python.exe" could not be run gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python "C:\Path\To\python.exe" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python ********************************************************** gyp ERR! find Python gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47) gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21) gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16) gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16) gyp ERR! stack at exithandler (child_process.js:315:5) gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! stack at onErrorNT (internal/child_process.js:465:16) gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21) gyp ERR! System Windows_NT 10.0.19041 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\\KHS\\Desktop\\React class\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\KHS\\Desktop\\React class\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83" gyp ERR! cwd C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt gyp ERR! node -v v14.16.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error 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\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) node-pre-gyp ERR! System Windows_NT 10.0.19041 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\KHS\\Desktop\\React class\\boilerplate-mern-stack-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" ack-master\node_modules\bcrypt node-pre-gyp ERR! cwd C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt node-pre-gyp ERR! node -v v14.16.0 node-pre-gyp ERR! node-pre-gyp -v v0.14.0 s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\User node-pre-gyp ERR! not ok t\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\KHS\Desktop\React class\b Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejn=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallb| ^16.0.0-0 but none is installed. You must install peer dependencies yourself.ack-to-build --module=C:\Users\KHS\Desktop\React class\boilerplate-mern-st.0.0-0 but none is installed. You must install peer dependencies yourself.npm WARN react-boiler-plate@1ack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\KHS\Desktop\React class\boilerplate-mern-les\fsevents):stack-master\node_modules\bcrypt\lib\binding --napi_version=7 --node_abi_nvents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})api=napi --napi_build_version=0 --node_napi_label=node-v83' (1) npm WARN react-redux@5.1.2 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself. npm WARN react-redux@5.1.2 requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself.npm WARN react-boiler-plate@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modual logging output above.les\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32",_11_535Z-debug.log"arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@3.0.8 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@3.0.8 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\KHS\AppData\Roaming\npm-cache\_logs\2021-02-27T21_22_11_535Z-debug.log
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
npm i 설치 에러 / npm run dev
안녕하세요 아주 맨처음(2강)에 선생님 깃허브에서 파일을 설치 받고 강의에 따라서 터미널을 켜서 npm i 를 하였는데 에러가 뜹니다... 신기하게 cd로 client해서 npm i 를 한거는 다운이 됩니다. 근데 전체 폴더에서 npm i가 되지 않아서 npm run dev를 했을 때 실행조차 되지 않네요 ㅠㅠ 에러를 봤는데 버전 차이인가요..? 사진첨부 합니다. <npm i 에러 사항> <npm run dev 에러 사항>
- 따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
에러좀 도와주세요
삭제된 글입니다
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
paypal 인스톨 에러가납니다
npm install --save react-paypal-express-checkout 하니까 에러가 나네요 ;; PS C:\Users\juno8\Desktop\boilerplate-mern-stack-master> cd client PS C:\Users\juno8\Desktop\boilerplate-mern-stack-master\client> npm install react-paypal-express-checkout --save npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@16.14.0 npm ERR! node_modules/react npm ERR! react@"^16.8.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"~0.14.8 || ^15.5.0" from react-paypal-express-checkout@1.0.5 npm ERR! node_modules/react-paypal-express-checkout npm ERR! react-paypal-express-checkout@"*" from the root project npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\juno8\AppData\Local\npm-cache\eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\juno8\AppData\Local\npm-cache\_logs\2021-02-25T21_34_15_370Z-debug.log PS C:\Users\juno8\Desktop\boilerplate-mern-stack-master\client> npm install react-paypal-express-checkout --save npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@16.14.0 npm ERR! node_modules/react npm ERR! react@"^16.8.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"~0.14.8 || ^15.5.0" from react-paypal-express-checkout@1.0.5 npm ERR! node_modules/react-paypal-express-checkout npm ERR! react-paypal-express-checkout@"*" from the root project npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\juno8\AppData\Local\npm-cache\eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\juno8\AppData\Local\npm-cache\_logs\2021-02-25T21_35_09_278Z-debug.log PS C:\Users\juno8\Desktop\boilerplate-mern-stack-master\client> npm i react-paypal-express-checkout npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@16.14.0 npm ERR! node_modules/react npm ERR! react@"^16.8.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"~0.14.8 || ^15.5.0" from react-paypal-express-checkout@1.0.5 npm ERR! node_modules/react-paypal-express-checkout npm ERR! react-paypal-express-checkout@"*" from the root project npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\juno8\AppData\Local\npm-cache\eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\juno8\AppData\Local\npm-cache\_logs\2021-02-25T21_36_03_452Z-debug.log PS C:\Users\juno8\Desktop\boilerplate-mern-stack-master\client> npm i react-paypal-express-checkout --save npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@16.14.0 npm ERR! node_modules/react npm ERR! react@"^16.8.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"~0.14.8 || ^15.5.0" from react-paypal-express-checkout@1.0.5 npm ERR! node_modules/react-paypal-express-checkout npm ERR! react-paypal-express-checkout@"*" from the root project npm ERR! npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\juno8\AppData\Local\npm-cache\eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\juno8\AppData\Local\npm-cache\_logs\2021-02-25T21_36_50_537Z-debug.log PS C:\Users\juno8\Desktop\boilerplate-mern-stack-master\client> npm install --save react-paypal-express-checkout >> npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@16.14.0 npm ERR! node_modules/react npm ERR! react@"^16.8.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"~0.14.8 || ^15.5.0" from react-paypal-express-checkout@1.0.5 npm ERR! node_modules/react-paypal-express-checkout npm ERR! react-paypal-express-checkout@"*" from the root project PS C:\Users\juno8\Desktop\boilerplate-mern-stack-master\client> npm i npm install --save react-paypal-express-checkout >> npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: client@0.1.0 npm ERR! Found: react@16.14.0 npm ERR! node_modules/react npm ERR! react@"^16.8.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"~0.14.8 || ^15.5.0" from react-paypal-express-checkout@1.0.5 npm ERR! node_modules/react-paypal-express-checkout npm ERR! react-paypal-express-checkout@"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\juno8\AppData\Local\npm-cache\eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\juno8\AppData\Local\npm-cache\_logs\2021-02-25T21_39_00_479Z-debug.log PS C:\Users\juno8\Desktop\boilerplate-mern-stack-master\client>
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
안녕하세요 강사님. 리덕스에 관한 질문이 있어 이렇게 글을 올립니다.
제가 이 강의에서 구현했던 쇼핑몰 카트에 add하는 기능의 redux action 부분을 redux saga로 전환해보고자 연습하고 있는데 좀 확실치 않고 헷갈리는 게 있어 이렇게 질문을 올리게 되었습니다. 그냥 action에서는 response에서 받아온 data을 이용하여 quantity에 대한 값을 처리해주었는데 saga에서는 어디서 response 데이터를 받아 어디서 quantity에 대한 값을 처리해야 할지 고민이네요. saga 쪽에서는 받은 response 데이터을 가지고 있는 것이 result 변수에 담고 있는 것은 알겠는데 이 변수 result을 이용해서 처리 후 다시 새로운 변수를 선언하여 payload에 넣어야 할지... 아니면 Axios 쪽에서 then을 통해 처리해야할지... 최선의 방법이 궁금합니다. 이 강의에서 saga을 다루지 않지만 혹시 saga에 대해 알고계시면 알려주시면 정말 감사하겠습니다. //action export function getCartItems(cartItems, userCart){ const request = Axios.get(`/api/product/products_by_id?id=${cartItems}&type=array`) .then(response =>{ . userCart.forEach(cartItem => { response.data.forEach((productDetail, index) => { if(cartItem.id === productDetail._id) { response.data[index].quantity = cartItem.quantity } }) }) return response.data; }); return { type: GET_CART_ITEMS, payload: request } } /////////////////////////////////////////////////////////////////////////////////////////////////////// //Saga const getCartItemsAPI = (Data) => { return axios.get("api/~......", Data); //.then(response => ~ }; function* getCartItems(action) { try { const result = yield call(getCartItemsAPI, action.payload); // result.data ~ console.log(result); yield put({ type: GET_CART_ITEMS, payload: result.data, }); } catch (e) { yield put({ type: GET_CART_ITEMS_FAIL, payload: e.response, }); } } function* watchgetCartItems() { yield takeEvery(GET_CART_ITEMS_REQUEST, getCartItems); }
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
도와주세요 ㅠㅠ!!!
깃허브 주소: https://github.com/jonashan20/react.node-shoppingmall 전 강의 까지는 잘 되다가 이번강의 따라하다 다시 테스트 하는 과정에서 또 에러가 납니다 ㅠㅠ 아예 몽고db서버랑 연결이 안되는것같아요 몽고db 다시 지우고 연결을 해봐도 소용이 없는거 같습니다.