inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

왜 User모델에 Posts가 들어올까요..?

미해결

[리뉴얼] React로 NodeBird SNS 만들기

User모델에 Post모델을 넣어서 로그인 오류를 해결한건 이해했습니다. 근데 왜 User모델에 들어간 이름이 Posts인가요..? 아무곳에서도 Posts라고 안쓰지않았나요?

  • react
  • redux
  • nodejs
  • express
  • Next.js
댓글 1 좋아요 0 조회수 240

바뀐 국기 사이트에 대하여

해결됨

[리뉴얼] 처음하는 파이썬 데이터 분석 (쉽게! 전처리, pandas, 시각화 전과정 익히기) [데이터분석/과학 Part1]

- 기존 사이트였던 www.countryflags.io 가 flagcdn.com 로 대체되면서 직접 따라해보니, 2가지 문제점이 있는 걸 발견했습니다. 1. 대문자로는 404 Not Found가 뜹니다. - 따라서 이미지 링크를 만들 때는 .lower() 로 소문자 변경 처리를 해줘야 합니다. - ex) https://flagcdn.com/48x36/US.png -> https://flagcdn.com/48x36/us.png 2. 국기 매칭 오류 - iso2와 Country_Region 를 매칭할 때부터 오류가 있는 것을 확인했습니다. - 시각화를 하면서 US가 워낙 인구가 많기에 눈에 보였지만 다른 것들도 제대로 매칭되었는 지는 확신할 수 없습니다. - 강의 자료를 바탕으로하면, US의 경우 AS로 매칭이 되어서 https://flagcdn.com/48x36/as.png 국기가 뜨더라구요. - 물론 강사님 말씀처럼, 이미지는 참고용이므로 크게 신경쓰지 않아도 될 문제같습니다. 그래서 저는 만들어진 데이터 프레임 값 중 US만 변경하려고 다음과 같이 허접하게 함수를 만들어서 보정했습니다. ㅎㅎ;; def test_func(row): if(row['Country_Region'] == 'US'): row['Country_Flag'] = 'https://flagcdn.com/48x36/us.png' return row doc_final_country = doc_final_country.apply(test_func, axis=1) 대강 국기가 잘 나오는 것 같네요. 혹시나 이 수업을 들으시는 누군가에게 도움이 될까..? 하여 간단히 기록 남겨봅니다..!

  • pandas
  • python
adamdoha 댓글 2 좋아요 2 조회수 419

개발자님 도와주세요

해결됨

초간단 초스피드 데이터 수집 (파이썬 크롤링)

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 import requests from bs4 import BeautifulSoup req = requests.get('https://www.cheonyu.com/product/view.html?qIDX=42562') soup = BeautifulSoup(req.text, 'html.parser') print(soup.select("#tab_01 > div.pic")) 여기서 상세페이지 이미지 url을 추출하고 싶은데 [<div class="pic" id="viewPcontent"> </div>] 이런식으로만 뜨고 끝이네요ㅜㅜ 뭐가 문제인지 모르겠어요 ㅠㅠ

  • 웹-크롤링
  • python
김경보 댓글 1 좋아요 0 조회수 231

linkSchema

해결됨

풀스택 리액트 토이프로젝트 - REST, GraphQL (for FE개발자)

linkSchema 안에 default 값 주는 부분에서 type을 boolean으로 주는 이유가 있을까요???

  • graphql
  • rest-api
  • react
bj2525 댓글 1 좋아요 0 조회수 206

페이지 구현 - 일기 쓰기

미해결

한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지

안녕하세요! 강의 잘 듣고 있었는데요 저도 윗 분들 처럼 일기 작성 후에 네비게이트로 페이지 이동까지는 되는데 작성한게 업데이트가 안됩니다 ㅠㅠ https://codesandbox.io/s/blazing-sun-kyl8yt?file=/src/components/EmotionItem.js

  • nodejs
  • react
  • javascript
김후ㄴ 댓글 1 좋아요 1 조회수 481

[파이썬 입문] 제가 만든 함수에 문제가 있어요

미해결

아래와 같이 코드를 작성하여 함수를 만들었습니다! 마지막 4.get_week 함수에서 자꾸 오류가 뜹니다. 이유는 'inst' 가 define 되지 않았다고 하는데, 검색했을 때 자료를 찾지 못하겠네요. 1.get_today_date 함수 제작 def get_today_date () : year = input ( "현재 년도를 입력해주세요:" ) month = input ( "현재 월를 입력해주세요:" ) day = input ( "현재 일을 입력해주세요:" ) return year + '-' + month + '-' + day get_today_date () #이렇게 하면 입력하는 칸이 나타남 2. get_difference 함수 from datetime import date def get_difference ( data_string ) : now = date ( * map ( inst , date_string.split ( '-' ))) result = now - date ( 1950 , 1 , 1 ) return result.days 3. get_week_by_difference def get_week_by_difference ( days ) : #10 week = "일월화수목금토" return weeks [ days % 7 ] 4. get_week def get_week () : today = get_today_date () diff = get_difference ( today ) today_week = get_week_by_difference ( diff ) print ( today_week ) get_week () *오류코드 현재 년도를 입력해주세요:2022 현재 월를 입력해주세요:5 현재 일을 입력해주세요:31 --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-64-950ea7f2390c> in <module> () 6 print ( today_week ) 7 ----> 8 get_week ( ) <ipython-input-64-950ea7f2390c> in get_week () 1 def get_week ( ) : 2 today = get_today_date ( ) ----> 3 diff = get_difference ( today ) 4 today_week = get_week_by_difference ( diff ) 5 <ipython-input-58-d8bf9d33531a> in get_difference (data_string) 2 3 def get_difference ( data_string ) : ----> 4 now = date ( * map ( inst , date_string . split ( '-' ) ) ) 5 result = now - date ( 1950 , 1 , 1 ) 6 return result . days NameError : name 'inst' is not defined

  • 파이썬
  • python
  • 파이썬기초
  • 파이썬함수
HY J 댓글 1 좋아요 1 조회수 404

img 태그가 작동이 되지 않습니다.

해결됨

프론트엔드 개발자를 위한, 실전 웹 성능 최적화(feat. React) - Part. 2

3-4 브랜치로 체크아웃을 하여 테스트해봐도 source의 srcset 속성에 {props.webp + 's'}를 줬을 때 이미지가 엑박이 뜹니다. previousSibling.srcset = previousSibling.dataset.srcset; 위 소스 한 줄을 지울 때는 정상동작 되는데 이유가 있을까요?

  • react
  • devtools
위펀 댓글 1 좋아요 1 조회수 431

리액트의 기초 동작중 props로 값전달이 궁금합니다

미해결

[리뉴얼] React로 NodeBird SNS 만들기

부모컴포넌트에서 리덕스를 사용하지않고 props로 값을 전달할때에 자식 컴포넌트에서 props.state를 사용하여 앞에 프롭스를 항상붙여 써도 동작하는경우가있고 프롭스 없이 state를 바로사용할수있는경우가 있는데 어떤 차이가있고 어떤걸 사용해야하는지 궁금합니다 만약 프롭스를 붙이지않고 정상적으로 동작하여도 props. 형태를 매번 사용하는것이 좋을까요? 아래는 예시 상황입니다 // 부모에게서 randomstate 를 전달받아 바로 사용하는 자식컴포넌트 const Child1 = ( randomstate ) => { console.log(randomstate); return 자식 컴포넌트 ; }; ... // props를 매번 이용하여 사용하는 컴포넌트 const Child2 = ( props, randomstate ) => { console.log(props.randomstate); return 자식 컴포넌트 ; }; ...

  • redux
  • express
  • react
  • nodejs
  • Next.js
댓글 1 좋아요 0 조회수 195

onCreate 및 dispatch 함수 내에서 data값 확인은 어떻게 할 수 있을까요?

해결됨

한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지

안녕하세요! 해당 강의를 다 마치고, 사진과 같이 onCreate 함수 내부에서 data를 콘솔로 출력해보니 data 값을 읽어오지 못하는데 그 이유가 뭘까요?? data.length와 같은 작업을 진행하고 싶은데 어떻게 접근해야 할지 모르겠어서 질문 남깁니다 !

  • nodejs
  • javascript
  • react
mihyun Lee 댓글 1 좋아요 0 조회수 248

안녕하세요 프로젝트를 react와 연동하기에 대해서 여쭈고 싶습니다 :)

해결됨

PHP 7+ 프로그래밍: 객체지향

안녕하세요 이번에 강의를 다 듣고 또 게시판도 여러번 수행해서 정말 잘 되는것을 확인을 하였습니다 하지만 이번에 react와 함께 연동을 해서 view는 react를 사용하고 또 api 설계는 php로 한번 해보자 하고 도전을 해 보았는데요 laravel에서는 굳이 cors를 지정하지 않아도 잘 연동이 되더라고요 하지만 이번 프로젝트는 어떻게 react를 사용해야하지.. 라고 막혔습니다 제가 생각했던 아이디어는 -frontend 폴더 -backend 폴더 를 따로 두고 proxy를 두어서 php 쪽에서 그냥 header로 cors를 넘겨주면 되지 않을까.. 라고 생각하고 들었는데요 https://github.com/DevelopJKong/php_react_project 일단 문제점은.. 제가 아직 실력이 부족해서 npm 으로 프로그램을 돌리는것이 아니기 때문에 되는게 아닐까? 라는 생각이 들었습니다 그래서 이번에는 상위 폴더에서 돌리는것이 아닌 따로따로서버를 켜서 해놨는데요 그래도.. 안되더라고요 혹시나 싶어서 CorsMiddleware를 만들어서 아래와 같이 만들어보고 post 로 보낼때 Route::add(x,y,[CorsMiddleware::class]) 도 입력해봤는데요 코드는 아래와 같습니다 <?php namespace App\Middlewares; use Eclair\Routing\Middleware; class CorsMiddleware extends Middleware { public static function process() { header("Content-type: application/x-javascript;charset=utf-8"); Header("Access-Control-Allow-Origin: *"); Header("Access-Control-Allow-Methods: POST, GET, OPTIONS"); Header("Access-Control-Allow-Headers:orgin, x-requested-with"); } } <?php use Eclair\Routing\Route; use App\Middlewares\RequireMiddleware; use App\Middlewares\CsrfTokenMiddleware; use App\Middlewares\CorsMiddleware; Route::add('post', '/api/auth', '\App\Controllers\AuthController::login', [CorsMiddleware::class] ); 조금 조언을 얻고자 이렇게 글을 쓰게 되었습니다 laravel에서는 그래도 해봤는데 laravel에서는 되더라고요 근데 왜이 프로젝트에서는 안될까? 라는 생각이 들었습니다 감사합니다 :)

  • react
  • cors
  • php
  • oop
cafe small house 댓글 1 좋아요 1 조회수 1404

[Mac] pyautogui 라이브러리에서 Messagebox 관련 함수 실행 시 무한로딩 현상이 있습니다

미해결

안녕하세요. 아래와 같은 코드를 실행 하였을 때, import pyautogui as pg pg . alert ( title = '123' , text = '234' , button = 'ddd' ) 아래와 같이 실행 됩니다 메세지 박스에 ddd 버튼 클릭 시 마우스 커서가 뱅글뱅글 돌면서 무한대기 상태가 됩니다 Python 강제종료 이전까지 계속 대기 상태이구요.. 먼저 파이썬 버전의 문제인가 싶어 3.10 버전에서 3.9로 다운그레이드 하여 테스트를 해보았으나 현상 동일하였고 Visual Studio의 문제인가 싶어 jupyter notebook과 Pycharm을 이용하여 테스트를 해보았으나 현상 동일하였습니다... 도와주세요 ㅠㅠ

  • 파이썬
  • python
  • pyautogui
파파팟 댓글 0 좋아요 0 조회수 576

소켓 프로그래밍 이란

미해결

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

질문있습니다. 소켓프로그래밍이라 하면 어떤것을 제작하는 것을 의미하나요 어렴풋이 서버 프로그래밍을 얘기하는 것 같은데.... 그리고 서버 어플리케이션을 만드는 것으 이야기하는지 서버의 운영체제를 만드는 것을 이야기하는지 잘 모르겠습니다. 도움말씀 부탁드려요..

  • 머신러닝 배워볼래요?
  • react-native
  • tensorflow
  • react
  • HTML/CSS
  • javascript
  • express
  • nodejs
신진 댓글 2 좋아요 1 조회수 826

각각 상품을 클릭해서 타이틀 id는 변경되는데, 바로 페이지가 바뀌질 않아요!

미해결

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

안녕하세요! 강의 잘 보고 있는 학생입니다! 여러모로 영상강의에 힘입어 도움을 많이 받게되어 항상 감사합니다! 이번 강의에서 의문점이 생겻는데, 그랩마켓 페이지에서 각 상품마다 id가 부여되어 새로운 페이지로 넘어 가야 하는상황인데, 클릭을하면 id는 가지게 되지만 바로 화면이 바뀌질 않아 당황하고 있습니다.. , 어디가 문제인지 모르겟습니다만.. 혹시 봐주실수 있으실까요? ㅜㅜ

  • react
  • javascript
  • nodejs
  • 머신러닝 배워볼래요?
  • react-native
  • tensorflow
  • HTML/CSS
  • react
  • express
BUCKY CHOI 댓글 2 좋아요 1 조회수 297

#2강 npm install

미해결

따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기

npm ERR! code 1 npm ERR! path C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\지은\AppData\Roaming\nvm\v16.15.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\지은\Downloads\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-v93' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@0.14.0 npm ERR! node-pre-gyp info using node@16.15.0 | win32 | x64 npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download npm ERR! node-pre-gyp info check checked for "C:\Users\지은\Downloads\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-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm 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-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@16.15.0 (node-v93 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-v93-win32-x64-unknown.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.15.0 | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.15.0 | win32 | x64 npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON npm ERR! gyp ERR! find Python checking if "python3" can be used npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if "python" can be used npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python38\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python38\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python37\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python37\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python36\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python36\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run npm ERR! C:\Users\지은\AppData\Local\npm-cache\_logs\2022-05-25T05_57_34_949Z-debug-0.lognpm ERR! code 1 npm ERR! path C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\지은\AppData\Roaming\nvm\v16.15.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\지은\Downloads\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-v93' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@0.14.0 npm ERR! node-pre-gyp info using node@16.15.0 | win32 | x64 npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download npm ERR! node-pre-gyp info check checked for "C:\Users\지은\Downloads\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-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm 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-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@16.15.0 (node-v93 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-v93-win32-x64-unknown.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.15.0 | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.15.0 | win32 | x64 npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON npm ERR! gyp ERR! find Python checking if "python3" can be used npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if "python" can be used npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python38\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python38\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python37\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python37\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python36\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python36\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run npm ERR! C:\Users\지은\AppData\Local\npm-cache\_logs\2022-05-25T05_57_34_949Z-debug-0.log 루트 디렉토리에서 npm install 오류가 계속뜹니다ㅠ 버전의 문제인가요...? 이 강의 꼭 듣고싶은데 해결방법이 있을까요..?

  • nodejs
  • express
  • mongodb
  • 웹앱
  • react
지은 댓글 4 좋아요 0 조회수 809

로그인할때 쿠키가 안들어갑니다.

미해결

[리뉴얼] React로 NodeBird SNS 만들기

배포했는데 회원가입도 되고, 로그인도 되는데, 쿠키가 안넘어갑니다. 개발모드일때는 쿠키가 넘어갔는데, 어디서 문제인지 모르겠습니다. 아이디 부분만 닉네임으로 바꿨습니다.

  • nodejs
  • react
  • redux
  • express
  • Next.js
star4381 댓글 2 좋아요 0 조회수 412

Plot 의 범례 이름이 안나와요... ㅠ

해결됨

일잘하는 마케터, MD에게 꼭 필요한 파이썬 데이터 분석

안녕하세요? 항상 좋은 강의 해주셔서 감사 드립니다. 저는 아래와 같이 범례 이름이 나오지 않는데, 이유가 뭔가요? ㅠ - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.

  • python
  • 웹-크롤링
lgy890218 댓글 1 좋아요 1 조회수 418

TypeError: Cannot read properties of undefined (reading 'findOne') 질문

미해결

[리뉴얼] React로 NodeBird SNS 만들기

안녕하세요 제로초님! 현재 백엔드 파트 게시물 좋아요 기능을 구현하다가 갑자기 회원가입과 로그인 기능에서 오류가 떠서 질문드립니다. 회원가입을 하게 되면, TypeError: Cannot read properties of undefined (reading 'findOne') 라는 오류가 발생하면서 데이터베이스에 데이터가 전송되지 않고 있습니다. 제가 생각하기에는 User모델에 문제가 발생하여 데이터가 들어가지 않아 findOne이 에러가 뜨는 것 같은데,,, 문제가 된다고 생각하는 코드 올리겠습니다. models/index.js const Sequelize = require("sequelize"); const env = process.env.NODE_ENV || "development"; const config = require("../config/config")[env]; const db = {}; const sequelize = new Sequelize( config.database, config.username, config.password, config, ); db.Comment = require("./comment")(sequelize, Sequelize); db.Hashtag = require("./hashtag")(sequelize, Sequelize); db.Post = require("./post")(sequelize, Sequelize); db.User = require("./user")(sequelize, Sequelize); db.Image = require("./image")(sequelize, Sequelize); Object.keys(db).forEach((modelName) => { if (db[modelName].associate) { db[modelName].associate(db); } }); // 반복문을 이용하여 각 데이터베이스의 관계를 설정해줌. db.sequelize = sequelize; db.Sequelize = Sequelize; module.exports = db; models/user.js const DataTypes = require("sequelize"); const { Model } = DataTypes; module.exports = (sequelize, DataTypes) => { const User = sequelize.define( "User", // id가 기본적으로 들어가있기 때문에 만들지 않아도 됨. { email: { type: DataTypes.STRING(30), allowNull: false, //필수 unique: true, //고유한 값 }, nickname: { type: DataTypes.STRING(30), allowNull: false, //필수}, }, password: { type: DataTypes.STRING(100), allowNull: false, //필수}, }, }, { charset: "utf8", collate: "utf8_general_ci", // 한글 저장 }, ); User.associate = (db) => { db.User.hasMany(db.Post); db.User.hasMany(db.Comment); db.User.belongsToMany(db.Post, { through: "Like", as: "Liked" }); db.User.belongsToMany(db.User, { through: "Follow", as: "Followers", foreignKey: "FollowingId", }); db.User.belongsToMany(db.User, { through: "Follow", as: "Followings", foreignKey: "FollowerId", }); }; return User; }; routes/user.js const express = require("express"); const bcrypt = require("bcrypt"); const passport = require("passport"); const { User, Post } = require("../models"); const { isLoggedIn, isNotLoggedIn } = require("./middlewares"); const router = express.Router(); router.get("/", async (req, res, next) => { // GET /user try { if (req.user) { const fullUserWithoutPassword = await User.findOne({ where: { id: req.user.id }, attributes: { exclude: ["password"], }, include: [ { model: Post, attributes: ["id"], }, { model: User, as: "Followings", attributes: ["id"], }, { model: User, as: "Followers", attributes: ["id"], }, ], }); res.status(200).json(fullUserWithoutPassword); } else { res.status(200).json(null); } } catch (error) { console.error(error); next(error); } }); router.post("/login", isNotLoggedIn, (req, res, next) => { passport.authenticate("local", (err, user, info) => { if (err) { console.error(err); return next(err); } if (info) { return res.status(401).send(info.reason); } return req.login(user, async (loginErr) => { if (loginErr) { console.error(loginErr); return next(loginErr); } const fullUserWithoutPassword = await User.findOne({ where: { id: user.id }, attributes: { exclude: ["password"], }, include: [ { model: Post, attributes: ["id"], }, { model: User, as: "Followings", attributes: ["id"], }, { model: User, as: "Followers", attributes: ["id"], }, ], }); return res.status(200).json(fullUserWithoutPassword); }); })(req, res, next); }); router.post("/", isNotLoggedIn, async (req, res, next) => { // async await을 이용하여 비동기 문제 해결 try { const exUser = await User.findOne({ where: { email: req.body.email, }, }); // 같은 이메일을 사용하고 있는 사람이 있는지 if (exUser) { return res.status(403).send("이미 사용중인 아이디입니다."); } // return이 없으면 아래있는 res도 실행이 됨. const hashedPassword = await bcrypt.hash(req.body.password, 13); await User.create({ email: req.body.email, nickname: req.body.nickname, password: hashedPassword, }); res.send("ok"); } catch (error) { console.error(error); next(error); } }); //post /user/ router.post("/user/logout", isLoggedIn, (req, res, next) => { req.logout(); req.session.destroy(); res.send("ok"); }); module.exports = router; 오류 사진

  • react
  • redux
  • express
  • nodejs
  • Next.js
댓글 2 좋아요 0 조회수 2016

css 시작하면서 "오늘의 감정점수 : " 가 추가되었네요

미해결

한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지

기본적인 CSS를 추가하실 때 갑자기 <select> 옆에 "오늘의 감정점수 : " 가 추가되어서 제가 놓쳤나 싶었네요 ㅎㅎ.. 다른 분들도 헷갈리시지 않게 강의 밑 소스코드를 참고하시거나 아래 코드를 넣어주시면 편하게 하실듯합니다~ < div > < span > 오늘의 감정점수 : </ span > < select name = " emotion " value = { state . emotion } onChange = { handleChangeState } > < option value = { 1 } > 1 </ option > < option value = { 2 } > 2 </ option > < option value = { 3 } > 3 </ option > < option value = { 4 } > 4 </ option > < option value = { 5 } > 5 </ option > </ select > </ div >

  • javascript
  • react
  • nodejs
tkddyd420 댓글 1 좋아요 4 조회수 343

useSwrInfinite 질문입니다.

미해결

Slack 클론 코딩[실시간 채팅 with React]

안녕하십니까 제로초님 슬랙 클론코딩 강의를 보고 실시간 챗을 구현해보고 있습니다. useSwrInfinite를 사용하여 구현하고 있고, 요청주기에 대해 궁금한점이 생겼습니다. useSwr은 DedupingInterval을 사용해서 설정한 주기 동안은 탭 변환이 일어나도 재요청을 보내지않고 캐시된 값을 그대로 사용하는 것으로 이해하고 있습니다. 그런데 useSwrInfinite의 요청 주기를 잘 모르겠어서 공식문서를 읽어보니 initialSize = 1 : 초기에 로드해야 하는 페이지의 수 revalidateAll = false : 항상 모든 페이지의 갱신 시도 revalidateFirstPage = true : always try to revalidate the first page persistSize = false : 첫 페이지의 키가 변경될 때, 페이지 크기를 1( initialSize 가 설정된 경우 initialSize )로 초기화하지 않음 챗을 쳐서 실시간으로 채팅이 화면에 그려질 수 있는이유는 초기에 initialSize = 1 로 설정되어 있어서 이차원 배열의 첫번째 배열이 갱신되어서 그런 것일까요? 챗을 칠때마다 갱신된 데이터를 get 할 수 있어서 좋지만 서버에 얼마만큼(어느주기로) 요청을 보내는지 알고 싶습니다.

  • swr
  • 웹팩
  • react
  • typescript
  • Socket.io
  • babel
  • react
  • 클론코딩
김동영 댓글 1 좋아요 0 조회수 711

쇼핑 크롤링 응용 질문 드립니다.

해결됨

일잘하는 마케터, MD에게 꼭 필요한 파이썬 데이터 분석

선생님께서 수업에서 보여주신 여러가지 크롤링을 응용해서 네이버 많이 구매하는 쇼핑 카테고리 크롤링 코드를 짜보았습니다. 그런데 해당 순위 100개까지 있는데, 현재 순위 15순위까지만 해서 나옵니다. 16위부터는 소스 자체에서 변화되는 것이 있을수 있는데 저로서는 한계네요 ;;; 리뷰 다음 페이지것까지 가져오기처럼 이것도 방법이 있을 것 같은데 혹시 알려주실 수 있을까요

  • 크롤링
  • 네이버쇼핑
  • 웹-크롤링
  • python
cat 댓글 1 좋아요 0 조회수 789

인기 태그

인프런 TOP Writers

주간 인기글