노드 삭제 재설치
해결됨
[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
그러면 안되지만 잘못 설치했을경우 노드 삭제 재설치 및 버전 업데이트 하는 방법에 대해서 혹시 유튜브에라도 해당 내용이 있을실까요?
- node.js
- mysql
- mongodb
- express
- typescript
- socket.io
- jwt
172만명의 커뮤니티!! 함께 토론해봐요.
해결됨
[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
그러면 안되지만 잘못 설치했을경우 노드 삭제 재설치 및 버전 업데이트 하는 방법에 대해서 혹시 유튜브에라도 해당 내용이 있을실까요?
미해결
[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
저는 이 화면으로만 보이고 domain 적는 구간이없는데.. 왜그럴까요 계속 로그인 상태 알람만 발생합니다. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>API 서버 로그인</title> <style> .input-group label { width: 200px; display: inline-block; } </style> </head> <body> {% if user and user.id %} <span class="user-name">안녕하세요! {{user.nick}}님</span> <a href="/auth/logout"> <button>로그아웃</button> </a> <fieldset> <legend>도메인 등록</legend> <form action="/domain" method="post"> <div> <label for="type-free">무료</label> <input type="radio" id="type-free" name="type" value="free"> <label for="type-premium">프리미엄</label> <input type="radio" id="type-premium" name="type" value="premium"> </div> <div> <label for="host">도메인</label> <input type="text" id="host" name="host" placeholder="ex) zerocho.com"> </div> <button>저장</button> </form> </fieldset> <table> <tr> <th>도메인 주소</th> <th>타입</th> <th>클라이언트 비밀키</th> </tr> {% for domain in domains %} <tr> <td>{{domain.host}}</td> <td>{{domain.type}}</td> <td>{{domain.clientSecret}}</td> </tr> {% endfor %} </table> {% else %} <form action="/auth/login" id="login-form" method="post"> <h2>NodeBird 계정으로 로그인하세요.</h2> <div class="input-group"> <label for="email">이메일</label> <input id="email" type="email" name="email" required autofocus> </div> <div class="input-group"> <label for="password">비밀번호</label> <input id="password" type="password" name="password" required> </div> <div>회원가입은 localhost:8001에서 하세요.</div> <button id="login" type="submit">로그인</button> </form> <script> window.onload = () => { if (new URL(location.href).searchParams.get('error')) { alert(new URL(location.href).searchParams.get('error')); } }; </script> {% endif %} </body> </html> view에 login도 위와 같이 들어가있습니다. const { User, Domain } = require("../models"); const { v4: uuidv4 } = require("uuid"); exports.renderLogin = async (req, res, next) => { try { const user = await User.findOne({ where: { id: res.user?.id || null }, include: { model: Domain } }) res.render("login", { user, domains: user?.Domains }) } catch (err) { console.error(err) next(err); } } exports.createDomain = async (req, res, next) => { try { await Domain.create({ UserId: req.user.id, host: req.body.host, type: req.body.type, client: uuidv4() }) res.redirect("/"); } catch (err) { console.error(err); next(err); } } controller에서도 강의대로 잘 렌더가 들어가있습니다. 그러니 화면이 보이긴하는데 왜 저만안보일까요.. - app.js에 passport의 initialize(), session() 함수 선언되어있습니다. - cookie도 있습니다. - db에 user도 있습니다.
미해결
[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
해당 질문에서 제로초님이 const limiter = rateLimit({ widowMs: 60 * 1000, max: (req, res) => { if (req.user?.type === 'premium') { return 10 } return 1; }, handler(req, res) { res.status(this.statusCode).json({ code: this.statusCode, message: `1분에 ${req.user?.type === 'premium' ? '열' : '한'} 번만 요청 할 수 있습니다...`, }); }, }); exports.apiLimiter = async (req, res, next) => { let user; if (res.locals.decoded) { user = await User.findOne({ where: { id: res.locals.decoded.id } }); } req.user = user; limiter(req, res, next); }; 이렇게 주셨는데 여기서 limiter을 상수형태로 참조하게끔하면 그럼 다수의 유저가 호출을 하게 될때 limiter이 같은 함수를 가르키고있어서 다른 유저가 호출한 api횟수에 영향을 받게 되지않나요? 강의 너무 잘보고있습니다!
해결됨
기초부터 배우는 Next YTMusic 클론 코딩 (with next.js 14, UI 마스터)
안녕하세요. 강의를 수강중인 수강생입니다. 혹시 컴포넌트들을 만들때엔 타입스크립트 tsx가 아닌 jsx를 사용하시는데, 이러한 이유가 있을까요? 추가적으로 React.FC에 대해 공부하다보니 지양한다는 글들이 많은데, 어떻게 생각하시는지 궁금합니다. 감사합니다.
해결됨
Airflow 마스터 클래스
안녕하세요. 외부 파이썬 함수 수행하기가 안되어서 문의드리게 되었습니다. 저는 Pycharm이 익숙해서 Pycharm으로 하고 있었는데, Pycharm의 경우 .env파일이 인식이 안되는 걸까요..? common 모듈을 발견하지 못하네요... .env파일을 아래와 같이 설정하였고 dags_python_import_ func.py 에서도 Enable EnvFile에 체크표시를 하였는데 여전히 해당 모듈을 읽지 못하네요...ㅠㅠ 혹시 Pycharm의 경우 .env파일을 다르게 설정해야하는 걸까요...?
미해결
실습으로 끝장내는 웹 크롤링과 웹 페이지 자동화 & 실전 활용
안녕하세요! 차근차근 잘 보고 있습니다. 선생님이랑 똑같이 따라하고 있는데 저는 자꾸 에러가 나서요ㅠㅠ ".logo_naver"가 없어진거 같아서 다른걸 붙여서 했는데도 오류가 나는데 뭐가 잘못된 걸까요ㅠㅠㅠㅠ 답변이 선생님이랑은 다르게 이렇게 나와서요ㅠㅠ 똑같이 따라하는데 뭐가 잘못된 건지 모르겠어요ㅠㅠ
미해결
[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요! 쌤 인프런, 유튜브 강의 보면서 잘 만들어 가고 있었는데 현재 코드에서 아무리 수정을 해도 css를 잘못 가져오는건지 오류가 생겨서 답답해서 질문 들고 왔습니다 현재 css 코드 찾기 좀 부탁드릴게요ㅠㅠ 안되는 항목 ✔ 연예뉴스 -> 내용을 못 가져옴 ✔ 스포츠뉴스 -> 제목, 날짜, 내용 다 못 가져옴 css를 여러개 바꿔서 넣어봐도 저는 자꾸 찾을 수 없다고 크롤링 됩니다 도와주세요,,,,,,, #네이버기사 크롤링 엑셀저장 import requests from bs4 import BeautifulSoup import time import pyautogui from openpyxl import Workbook #사용자입력 keyword = pyautogui.prompt("검색어를 입력하세요") lastpage = int(pyautogui.prompt("몇 페이지까지 크롤링 할까요?")) #엑셀 생성 wb = Workbook() #엑셀시트 생성 ws = wb.create_sheet(keyword) #열 너비 조절 ws.column_dimensions['A'].width = 60 ws.column_dimensions['B'].width = 30 ws.column_dimensions['C'].width = 60 ws.column_dimensions['D'].width = 150 #행 번호 row = 1 #페이지 번호 pageNum = 1 for i in range(1, lastpage*10, 10) : print(f"{pageNum}페이지 크롤링중입니다 =================") response = requests.get(f"https://search.naver.com/search.naver?where=news&query={keyword}&sm=tab_opt&sort=1&photo=0&field=0&pd=3&ds=2024.04.11&de=2024.15.20&news&query={keyword}&start={i}") html = response.text soup = BeautifulSoup(html, 'html.parser') articles = soup.select("div.info_group") #뉴스기사 div 10개 추출 for article in articles: links = article.select("a.info") #리스트 time.sleep(0.7) if len(links) >= 2: #링크가 2개 이상이면 url = links[1].attrs['href'] #두번째 링크의 href를 추출 response = requests.get(url, headers={'User-agent': 'Mozilla/5.0'}) html = response.text soup_sub = BeautifulSoup(html, 'html.parser') content = soup_sub.select_one("#newsct_article") if content: content_text = content.get_text(separator="\n") else: content_text = "내용을 찾을 수 없습니다." title = None date = None #만약 연예 뉴스라면 if "entertain" in response.url: title = soup_sub.select_one(".end_tit") date = soup_sub.select_one("div.article_info > span > em") content = soup.select_one("#articeBody") #만약 스포츠 뉴스라면 elif "sports" in response.url: title = soup_sub.select_one(".Main_article_title") content = soup.select_one("._article_content") else: title = soup_sub.select_one(".media_end_head_headline") date = soup_sub.select_one("span.media_end_head_info_datestamp_time._ARTICLE_DATE_TIME") #본문 내용안에 불필요한 div, p제거 divs = content.select("div") for div in divs: div.decompose() paragraphs = content.select("p") for p in paragraphs: p.decompose() print("=======제목======= \n", title.text.strip() if title else "제목을 찾을 수 없습니다.") print("=======날짜======= \n", date.text if date else "날짜를 찾을 수 없습니다.") print("=======URL======= \n", url) print("=======내용======= \n", content.text.strip() if content else "내용을 찾을 수 없습니다") # 'else' 블록에서 'date' 변수 정의는 여기서 끝나도록 수정 ws['A1'] = '제목' ws['B1'] = '날짜' ws['C1'] = 'URL' ws['D1'] = '내용' ws[f'A{row}'] = title.text.strip() if title else "제목을 찾을 수 없습니다." ws[f'B{row}'] = date.text.strip() if date else "날짜를 찾을 수 없습니다." ws[f'C{row}'] = url ws[f'D{row}'] = content_text.strip() if content else "내용을 찾을 수 없습니다." row=row+1 #마지막 페이지 여부 확인하기 next_button = soup.select_one("a.btn_next") if next_button: isLastPage = next_button.attrs.get('aria-disabled', None) if isLastPage == 'true': print("마지막 페이지 입니다.") break pageNum = pageNum+1 wb.save(f"{keyword}_4월_뉴스기사_크롤링(4)_내용까지_0411~0415(3).xlsx")
해결됨
기초부터 배우는 Next YTMusic 클론 코딩 (with next.js 14, UI 마스터)
안녕하세요 강사님은 코드 수정 후 브라우저에서 바로바로 확인이 되는 것 같은데 저는 코드를 수정할 때 마다 아래의 오류가 발생해서 매번 다시 yarn dev를 해줘야 수정한 내역이 확인이 되다 보니 강의를 따라 진행 하는대 집중이 되질 않네요. 혹시 아래의 에러가 발생 되지 않게 하는 방법이 있는 것인지 문의 드립니다. 감사합니다. 수고하세요. =================================================================== ⨯ [Error: UNKNOWN: unknown error, open 'D:\study\react\workspace\yt-music-clone-next\.next\static\chunks\app\layout.js'] { errno: -4094, code: 'UNKNOWN', syscall: 'open', path: 'D:\\study\\react\\workspace\\yt-music-clone-next\\.next\\static\\chunks\\app\\layout.js' ===================================================================
미해결
모두의 한국어 텍스트 분석과 자연어처리 with 파이썬
안녕하세요 선생님 대학교에서 캡스톤디자인을 수행하고 있는 학생입니다. 판결문에서 사건의 원인,판결 결과,가중·감소 처벌 요소,키워드를 추출하고 싶은데 어떤 기술을 사용해야할지 막막하여 질문올리게 되었습니다. 거대언어모델은 지양하라고 교수님께서 말씀하셨습니다..ㅜ 조언을 주신다면 감사하겠습니다.
해결됨
Windows 소켓 프로그래밍 입문에서 고성능 서버까지!
제공해주신 멀티스레드 소켓 프로그램에 LPVOID 형을 가지는 매개변수에 일반 변수를 지정하셨는데 LPVOID 는 포인터와 일반변수 모두 가능 한 건지요? 주신 프로그램을 보면 SOCKET hClient = 0; // SOCKET 형 변수를 선언 hThread = ::CreateThread( NULL, 0, ThreadFunction, (LPVOID)hClient, // 주소가 아닌 값을 지정 0, &dwThreadID); 만약 가능하다면 내부적으로 어떻게 가능한지 확인 부탁드려봅니다. 늘 좋은 강의 감사합니다. 강사님
해결됨
Airflow 마스터 클래스
안녕하세요 강사님! dags_python_with_ templates.py 파일에서 show_templates 함수를 아무 인자도 넣지 않고 실행을 시키는데요, dag 실행시 출력되는 키워드 인자들은 에어플로우 태스크 객체에 기본으로 입력되는 값들인가요? 정확한 원리가 궁금하여 여쭤봅니다
미해결
Slack 클론 코딩[실시간 채팅 with React]
안녕하세요 포트폴리오를 하나 만들고 싶어서 슬리액 프론트 관련해서 다 클론코딩하였는데 강사님이 배포하신거 비슷하게 sleat.nodebird.com 처럼 유사하게 배포할려면 리액트 노드버드 강좌에서 aws 나 배포관련 부분만 들으면 될까요?
미해결
파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트 (장고 4.2 기준)
관련 도서 출간은 언제쯤 예상하시나요? 건강하시길 바라요~
미해결
프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
안녕하세요 강의 자료 부탁드립니다 감사합니다
해결됨
기초부터 배우는 Next YTMusic 클론 코딩 (with next.js 14, UI 마스터)
2분 50초쯤에서 멀티선택 하는 방법 알려주시면 감사하겠습니다!!
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 원핫 인코딩에서 0,1이 아니고 False,True가 나옴
해결됨
Airflow 마스터 클래스
powershell에서 wsl --install을 입력한 후에 ubuntu 시작하는중... 이 출력되고 그 다음에 응답이 없는데 이런 경우 어떻게 해야할까요?
미해결
Slack 클론 코딩[실시간 채팅 with React]
[배포하기]를 수강 이후에 개발한 프로젝트를 aws에 배포하는 중에서 문제가 발생하여 질문 드려요 devServer: { historyApiFallback: true, host: '퍼블릭 IPv4 주소', port: 3333, devMiddleware: { publicPath: '/dist/' }, static: { directory: path.resolve(__dirname) }, }, host에 퍼블릭 IPv4 주소 을 설정하고 aws에 port 3333 포트를 열어 주었습니다. "scripts": { "dev": "webpack serve --env development", "build": "webpack", "start": "webpack serve" }, npm run build 이후에 npm run start 할 경우 (퍼블릭 IPv4 주소 -> ex: 11.111.111.11 Error: listen EADDRNOTAVAIL: address not available 11.111.111.11:3333 at Server.setupListenHandle [as _listen2] (net.js:1314:21) at listenInCluster (net.js:1379:12) at doListen (net.js:1516:7) at processTicksAndRejections (internal/process/task_queues.js:83:21) { code: 'EADDRNOTAVAIL', errno: -99, syscall: 'listen', address: '11.111.111.11', port: 3333 } 오류가 발생했습니다. 무엇이 문제인지 잘 모르겠어서 질문드립니다. [aws 실행상태] aws_인스턴스 한개에 back,front 폴더를 git을 사용 하여 백,프론트를 실행하고 있습니다. [전체 코드 - webpack.config.js] const path = require('path'); const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin'); const webpack = require('webpack'); const isDevelopment = process.env.NODE_ENV !== 'production'; const config = { name: 'google_meet', mode: isDevelopment ? 'development' : 'production', devtool: isDevelopment ? 'hidden-source-map' : 'inline-source-map', resolve: { extensions: ['.js', '.jsx', '.json'], alias: { '@hooks': path.resolve(__dirname, 'hooks'), '@components': path.resolve(__dirname, 'components'), '@layouts': path.resolve(__dirname, 'layouts'), '@pages': path.resolve(__dirname, 'pages'), '@utils': path.resolve(__dirname, 'utils'), }, }, entry: { app: './client', }, module: { rules: [ { test: /\.jsx?$/, loader: 'babel-loader', options: { presets: [ [ '@babel/preset-env', { targets: { browsers: ['last 2 chrome versions'] }, debug: isDevelopment, }, ], '@babel/preset-react', ], env: { development: { plugins: [require.resolve('react-refresh/babel')], }, }, }, exclude: path.join(__dirname, 'node_modules'), }, { test: /\.css?$/, use: ['style-loader', 'css-loader'], }, ], }, plugins: [new webpack.EnvironmentPlugin({ NODE_ENV: isDevelopment ? 'development' : 'production' })], output: { path: path.join(__dirname, 'dist'), filename: '[name].js', publicPath: '/dist/', }, devServer: { historyApiFallback: true, host: '퍼블릭 IPv4 주소', port: 3333, devMiddleware: { publicPath: '/dist/' }, static: { directory: path.resolve(__dirname) }, }, }; if (isDevelopment && config.plugins) { config.plugins.push(new webpack.HotModuleReplacementPlugin()); config.plugins.push(new ReactRefreshWebpackPlugin()); } if (!isDevelopment && config.plugins) { } module.exports = config;
해결됨
[신규 개정판] 이것이 진짜 엑셀자동화다 - 기본편
안녕하세요 네이버 메일 자동화 코드를 실행하면 메일 쓰기 버튼을 계속 찾지 못하고 있어 어떻게 수정하면 될지 문의드립니다. 메일함 이동까지는 정상적으로 되고 있으나 메일 쓰기 버튼만 찾지 못하고 있습니다. 코드는 다음과 같습니다. from selenium.webdriver import ChromeOptions from selenium import webdriver from selenium.webdriver.chrome.service import Service as ChromeService from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.common.by import By import time import pyperclip import pyautogui from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC options = ChromeOptions() options.add_experimental_option("detach", True) driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=options) driver.get('https://nid.naver.com/nidlogin.login?mode=form&url=https://www.naver.com/') driver.maximize_window() # 화면 최대화 # 아이디 입력창 id = driver.find_element(By.CSS_SELECTOR, '#id') id.click() pyperclip.copy('eooe5173') pyautogui.hotkey('ctrl', 'v') time.sleep(2) # 비밀번호 입력창 passward = driver.find_element(By.CSS_SELECTOR, '#pw') passward.click() pyperclip.copy('ssw471395~') pyautogui.hotkey('ctrl', 'v') time.sleep(2) # 로그인 버튼 driver.find_element(By.CSS_SELECTOR, '#log\.login').click() time.sleep(5) # 메일함으로 이동 mailbox = driver.find_element(By.CSS_SELECTOR,'#shortcutArea > ul > li:nth-child(1) > a').click() time.sleep(5) # 내게 쓰기 버튼 writeme_button =driver.find_element(By.CSS_SELECTOR, '#root > div > nav > div > div.lnb_header > div.lnb_task > a.item.button_write').click() # 메일 제목 입력창 및 입력 mailname = driver.find_element(By.CSS_SELECTOR, '#subject_title').click() pyperclip.copy('안녕하세요') pyautogui.hotkey('ctrl', 'v') time.sleep(5) # 메일 내용 입력창 및 입력 mailinfo = driver.find_element(By.CSS_SELECTOR, '#body > div > div.workseditor-content').click() pyperclip.copy('네이버 메일 자동화입니다.') pyautogui.hotkey('ctrl', 'v') time.sleep(5) # 메일 저장 mailsave = driver.find_element(By.CSS_SELECTOR, '#content > div.mail_toolbar.type_write > div:nth-child(1) > div > button.button_write_task').click() time.sleep(5) 에러는 동일하게 다음과 같이 노출되고 있습니다. selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"#root > div > nav > div > div.lnb_header > div.lnb_task > a.item.button_write"} (Session info: chrome=123.0.6312.123) Stacktrace: GetHandleVerifier [0x00D14CA3+225091] (No symbol) [0x00C44DF1] (No symbol) [0x00AE9A7A] (No symbol) [0x00B2175B] (No symbol) [0x00B2188B] (No symbol) [0x00B57882] (No symbol) [0x00B3F5A4] (No symbol) [0x00B55CB0] (No symbol) [0x00B3F2F6] (No symbol) [0x00B179B9] (No symbol) [0x00B1879D] sqlite3_dbdata_init [0x01189A43+4064547] sqlite3_dbdata_init [0x0119104A+4094762] sqlite3_dbdata_init [0x0118B948+4072488] sqlite3_dbdata_init [0x00E8C9A9+930953] (No symbol) [0x00C507C4] (No symbol) [0x00C4ACE8] (No symbol) [0x00C4AE11] (No symbol) [0x00C3CA80] BaseThreadInitThunk [0x764EFCC9+25] RtlGetAppContainerNamedObjectPath [0x77DE7C5E+286] RtlGetAppContainerNamedObjectPath [0x77DE7C2E+238]
해결됨
Next + React Query로 SNS 서비스 만들기
tanstack query와 next.js 를 함께 사용하면서 의문이 들어 질문합니다! 강의의 코드를 보니 같이 prefetch를 해도 유저데이터는 useQueryClient를 사용해서 데이터를 재사용하는듯한데 안에 하위 컴포넌트의 경우 prefetch를하고 useQuery를 사용해서 데이터를 가져오는듯 하더라구요 이 경우도 데이터를 재사용하는건가요? 아니면 새로 가져오는건가요? 그렇다면 똑같이 데이터를 prefetch해도 useQueryClient를 사용해서 가져오는것과 useQuery를 사용해서 가져와야하는 기준이 있을까요? (저의경우 프로젝트 전체를 prefetch후 useQueryClient를해서 데이터를 가져왔더니 데이터를 가져옴과 동시에 fresh가아니라 inactive상태가 되더라구요. ) 좋은강의 감사합니다. 벚꽃같은 제로초 화이팅