inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

지원 중단된 기능이 사용됨 이라고 나오네요 ㅠㅠ

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

getCurrentPosition() 및 watchPosition()은 더 이상 안전하지 않은 출처에서 작동하지 않습니다. 이 기능을 사용하려면 애플리케이션을 HTTPS와 같은 안전한 출처로 전환하는 것을 고려해야 합니다. 자세한 내용은 다음 페이지를 참고하세요 코드 입니다 const askForLocation = function () { navigator.geolocation.getCurrentPosition((position) => { console.log(position); }); }; .

  • react
  • node.js
  • seo
  • graphql
  • next.js
지우혁 댓글 2 좋아요 0 조회수 931

스토리지 데이터에 하나만 안지워 지네요

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

스토리지 데이터에 다른건 다 삭제 되는데 하나 남았을때 삭제가 안되네요 전체 삭제하든 더블클릭으로 삭제하든 삭제가 안되네요 추가적으로 전체삭제를 해도 데이터가 안지워 지네요 ㅠㅠ 코드입니다. const todoInput = document.querySelector("#todo-input"); const todoList = document.querySelector("#todo-list"); //로컬스토리지에서 데이터 빼오기 const savedTodoList = JSON.parse(localStorage.getItem("saved-items")); const createTodo = function (storageData) { //할일 추가 함수 let todoContents = todoInput.value; if (storageData) { todoContents = storageData.contents; } const newLi = document.createElement("li"); const newSpan = document.createElement("span"); const newBtn = document.createElement("button"); //할일 완료 이벤트 newBtn.addEventListener("click", () => { newLi.classList.toggle("complete"); saveItemsFn(); }); //할일 삭제 이벤트 newLi.addEventListener("dblclick", () => { newLi.remove(); saveItemsFn(); }); if (storageData?.complete) { newLi.classList.add("complete"); } newSpan.textContent = todoContents; newLi.appendChild(newBtn); newLi.appendChild(newSpan); todoList.appendChild(newLi); todoInput.value = ""; saveItemsFn(); }; const keyCodeCheck = function () { //할일 추가 실행 함수 if (window.event.keyCode === 13 && todoInput.value !== "") { createTodo(); } }; const deleteAll = function () { //전체 삭제 함수 const liList = document.querySelectorAll("li"); for (let i = 0; i < liList.length; i++) { liList[i].remove(); } saveItemsFn(); }; const saveItemsFn = function () { //할일 저장 함수(네트워크 스토리지에) const saveItems = []; for (let i = 0; i < todoList.children.length; i++) { const todoObj = { contents: todoList.children[i].querySelector("span").textContent, complete: todoList.children[i].classList.contains("complete"), }; saveItems.push(todoObj); } saveItems.length === 0 ? localStorage.removeItem("saved-Items") : localStorage.setItem("saved-items", JSON.stringify(saveItems)); }; if (savedTodoList) { for (let i = 0; i < savedTodoList.length; i++) { createTodo(savedTodoList[i]); } }

  • react
  • node.js
  • seo
  • graphql
  • next.js
지우혁 댓글 1 좋아요 0 조회수 324

getStaticPaths-> getStaticProps

해결됨

Next.js 시작하기(feat. 지도 서비스 개발)

export const getStaticPaths: GetStaticPaths = async () => { const stores = (await import('../public/stores.json')).default; const paths = stores.map((store) => ({ params: { name: store.name } })); return { paths, fallback: false }; }; export const getStaticProps: GetStaticProps = async ({ params }) => { const stores = (await import('../public/stores.json')).default; const store = stores.find((store) => store.name === params?.name); return { props: { store } }; }; getStaticPaths에서 리턴하는 paths가 getStaticProps 매개변수 params인가요??

  • seo
  • next.js
  • vercel
  • csr
  • ssg
  • ssr
오일중 댓글 1 좋아요 1 조회수 593

[Next.js에 Private Route 관련문의]

해결됨

Next.js 시작하기(feat. 지도 서비스 개발)

안녕하세요. 강의 잘 보고 있습니다. 질문이 몇가지있어 문의드립니다. 1. Private Route 관련 로그인된 유저만 접근할 수 있는 페이지 라우팅 경로를 아래와 같이 만들어 볼려고 하는데 next-auth에 useSession, getServerSession 으로 페이지 마다 각각 접근 제한하는 방식 말고 app/my 폴더에서 하위에 모두 접근을 제한 하는 방식이 있는지 궁금하여 문의 드립니다. app/my/profiles/page.tsx app/my/membership/page.tsx app/my/qna/page.tsx 2. API 공통 에러 처리 관련 API호출시 not-found.tsx를 사용해서 API 경로 404를 json으로 보내줄 수 있는지 궁금합니다. 그리고 app/api/test/route.ts 에서 각각 try catch로 익셉션을 체크 해서 http 500을 리턴하는 방식말고 middleware에서 공통으로 오류 처리를 할수 있는지 궁금합니다. middleware.ts로 로그인 체크 하는 코드는 많이 검색이 되는데 공통으로 오류 처리는 검색이 딸려서 그런지 찾을수가 없네요.

  • seo
  • next.js
  • vercel
  • csr
  • ssg
  • ssr
심재화 댓글 2 좋아요 1 조회수 858

jwt must be provided 오류

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

안녕하세요! 섹터 52이후 수업을 진행하는데 자꾸 비쥬얼 스튜디오 터미널에 jwt must be provided: {"response":{"errors":[{"message":"jwt must be provided","locations":[{"line":3,"column":9}],"path":["restoreAccessToken"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"name":"JsonWebTokenError","message":"jwt must be provided","stacktrace":["JsonWebTokenError: jwt must be provided"," at Object.module.exports [as verify] (/codecamp_backend_api/node_modules/jsonwebtoken/verify.js:53:17)"," at RestoreAccessTokenService.createAccessToken (/codecamp_backend_api/dist/api/token/services/mutation/restoreAccessToken.service.js:38:31)"," at runMicrotasks (<anonymous>)"," at processTicksAndRejections (internal/process/task_queues.js:93:5)"]}}}],"data":null,"status":200,"headers":{}},"request":{"query":"\n mutation {\n restoreAccessToken {\n accessToken\n }\n }\n"}} 라는 오류가 뜹니다 getAccessToken.ts 부문 뮤테이션에서 오류 나는거 같은데 혹시 왜이러는지 알 수 있을까요?

  • react
  • node.js
  • seo
  • graphql
  • next.js
Hyeonsang Kim 댓글 1 좋아요 0 조회수 2285

투두리스트 배경화면 적용 404 오류

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

강의부분에 const weatherDataActive = function({location, weather}){ const locationNameTag = document.querySelector('#location-name-tag'); locationNameTag.textContent = location; console.log(weather); document.body.style.backgroundImage = `url('./images/${weather}.jpg')` }; 이 부분을 제가 똑같이 따라했는데요 노션에 있는 사진 자료 그대로 다운받았고 선생님이 말씀하신 경로에 똑같이 담았는데 document.body.style.backgroundImage = `url('./images/${weather}.jpg')` 이걸 치니까 직전에 선생님이랑 같이 적용했던 css 백그라운드 이미지(햇빛)도 안나오고 404오류가 떠요ㅠㅠ왜일까요?

  • react
  • node.js
  • seo
  • javascript
치카치카 댓글 1 좋아요 0 조회수 656

18강 useStores 관련 질문

해결됨

Next.js 시작하기(feat. 지도 서비스 개발)

안녕하세요, 강의 잘 듣고 있습니다. 18강에서 궁금한 점이 있어 질문드립니다. useStores 함수에서 return 값에 다음과 같이 괄호가 들어가 있는 이유가 무엇인가요? return { initializeStores, } 답변 주시면 감사하겠습니다.

  • seo
  • next.js
  • vercel
  • csr
  • ssg
  • ssr
ey 댓글 2 좋아요 1 조회수 462

docker-compose up 오류

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

선생님 안녕하세요 수업 잘듣고있습니다! freebord 폴더로 docker-compose up 했는데 오류가 났어요 혼자해볼려했지만 잘안되서 올려요.. /boards/[boardId]/index.tsx import { gql, useQuery } from "@apollo/client"; import { useRouter } from "next/router"; import { IQuery, IQueryFetchBoardArgs, } from "../../../../src/commons/types/generated/types"; import BoardWrite from "../../../../src/components/units/board/write/BoardWrite.container"; const FETCH_BOARD = gql` query fetchBoard($boardId: ID!) { fetchBoard(boardId: $boardId) { writer title contents youtubeUrl boardAddress { zipcode address addressDetail } images } } `; export default function BoardsEditPage() { const router = useRouter(); if (typeof router.query.boardId !== "string") { alert("올바르지 않은 게시글 아이디입니다."); void router.push("/"); return <></>; } const { data } = useQuery<Pick<IQuery, "fetchBoard">, IQueryFetchBoardArgs>( FETCH_BOARD, { variables: { boardId: router.query.boardId } } ); return <BoardWrite isEdit={true} data={data} />; } #0 95.00 Error occurred prerendering page "/boards/[boardId]". Read more: https://nextjs.org/docs/messages/prerender-error #0 95.00 ReferenceError: alert is not defined #0 95.00 at BoardDetail (/freeBoard_/.next/server/pages/boards/[boardId].js:308:9) #0 95.00 at d (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498) #0 95.00 at bb (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16) #0 95.00 at a.b.render (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43) #0 95.00 at a.b.read (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83) #0 95.00 at Object.exports.renderToString (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:52:138) #0 95.00 at Object.renderPage (/freeBoard_/node_modules/next/dist/server/render.js:751:45) #0 95.00 at Object.defaultGetInitialProps (/freeBoard_/node_modules/next/dist/server/render.js:389:51) #0 95.00 at Function.getInitialProps (/freeBoard_/.next/server/pages/_document.js:530:20) #0 95.00 at Object.loadGetInitialProps (/freeBoard_/node_modules/next/dist/shared/lib/utils.js:69:29) #0 95.00 #0 95.00 Error occurred prerendering page "/boards/[boardId]/edit". Read more: https://nextjs.org/docs/messages/prerender-error #0 95.00 ReferenceError: alert is not defined #0 95.00 at BoardsEditPage (/freeBoard_/.next/server/pages/boards/[boardId]/edit.js:48:9) #0 95.00 at d (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498) #0 95.00 at bb (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16) #0 95.00 at a.b.render (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43) #0 95.00 at a.b.read (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83) #0 95.00 at Object.exports.renderToString (/freeBoard_/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:52:138) #0 95.00 at Object.renderPage (/freeBoard_/node_modules/next/dist/server/render.js:751:45) #0 95.00 at Object.defaultGetInitialProps (/freeBoard_/node_modules/next/dist/server/render.js:389:51) #0 95.00 at Function.getInitialProps (/freeBoard_/.next/server/pages/_document.js:530:20) #0 95.00 at Object.loadGetInitialProps (/freeBoard_/node_modules/next/dist/shared/lib/utils.js:69:29) #0 95.00 info - Generating static pages (2/8) #0 95.04 info - Generating static pages (4/8) #0 95.04 [] #0 95.05 info - Generating static pages (6/8) #0 96.43 info - Generating static pages (8/8) #0 96.43 #0 96.43 > Build error occurred #0 96.43 Error: Export encountered errors on following paths: #0 96.43 /boards/[boardId] #0 96.43 /boards/[boardId]/edit #0 96.43 at /freeBoard_/node_modules/next/dist/export/index.js:498:19 #0 96.43 at runMicrotasks (<anonymous>) #0 96.43 at processTicksAndRejections (internal/process/task_queues.js:95:5) #0 96.43 at async Span.traceAsyncFn (/freeBoard_/node_modules/next/dist/trace/trace.js:75:20) #0 96.43 at async /freeBoard_/node_modules/next/dist/build/index.js:1024:17 #0 96.43 at async Span.traceAsyncFn (/freeBoard_/node_modules/next/dist/trace/trace.js:75:20) #0 96.43 at async /freeBoard_/node_modules/next/dist/build/index.js:898:13 #0 96.43 at async Span.traceAsyncFn (/freeBoard_/node_modules/next/dist/trace/trace.js:75:20) #0 96.43 at async Object.build [as default] (/freeBoard_/node_modules/next/dist/build/index.js:82:25) #0 96.55 error Command failed with exit code 1. #0 96.55 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ------ failed to solve: executor failed running [/bin/sh -c yarn build]: exit code: 1

  • react
  • node.js
  • seo
  • graphql
  • next.js
hyt630844 댓글 1 좋아요 1 조회수 586

스타일링 명시도 질문 (@layer)

해결됨

Next.js 시작하기(feat. 지도 서비스 개발)

@layer base { #__next { display: contents; } } #__next를 레이어 두어 스타일링 명시도를 낮춘 것에 대한 이유가 궁금합니다. 혹시 next.js 내부에서 (프레임워크 내부에서) id : __next 를 스타일링하면 내가 작성한 코드보다 우선시 되도록 하기 위함인가요??

  • seo
  • next.js
  • vercel
  • csr
  • ssg
  • ssr
콩팥팥죽 댓글 1 좋아요 2 조회수 317

캐시 stale 질문입니다.

해결됨

Next.js 시작하기(feat. 지도 서비스 개발)

안녕하세요 강의 감사합니다. 잘듣고잇습니다. 헤더에서 처음보는 값이 잇는데 x-nextjs-cache: STALE hit는 알겟습니다. stale이 라고 표기되는 기준이 무엇인가요? 서버의 최신 값이 아닌걸 어떻게 알죠? revalidate 되기 전에는 hit 로 표기되고 revalidate 되는 동안에는 stale 표기가 되는 건가요? 그리고 추측이 맞다면 revalidate 되는 동안이라는건 서버에 다시 요청보내고 응답받을때 까지를 말하는게 맞을까요? (* 여기는 읽으실 필요 없습니다. 질문이랑 같이 메모한거에요 그리고 revalidate 되었는데 값이 안바뀌면 캐시는 stale이라하더라도 e-tag로 2차 검증하고 태그 값이 같아서 그래도 사용한다 (강의 내용 그대로) 값이 바뀌면 hit 되고 e-tag값도 갱신한다. )

  • seo
  • next.js
  • vercel
  • csr
  • ssg
  • ssr
콩팥팥죽 댓글 1 좋아요 2 조회수 1068

ssr 캐시 가능한지 질문

해결됨

Next.js 시작하기(feat. 지도 서비스 개발)

ssr인데 해당 html에 연결된 js 파일이 있어서 js파일로 동적으로 렌더링하면 ssr로 내려진 html 자체는 캐시가 가능한가요? *ex) ssr로 받아온 infren.html 안에 user.js 파일 있고 user.js에서 ajax로 사용자 이름만 json으로 받아와 렌더링하면 infren.html과 user.js은 캐시할 수 있나요???

  • seo
  • next.js
  • vercel
  • csr
  • ssg
  • ssr
콩팥팥죽 댓글 1 좋아요 1 조회수 851

서버 라우터 에러 문의

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

state 끌어올리기 수업부분에서 계속 이런 오류가 나서 문의드립니다. 혹시나 해서 다른 서버들은 종료를 해놓고 이것만 다시 실행을 했는데도 계속 오류가 발생하네요. 어떤부분이 잘못된 것인가요?

  • react
  • node.js
  • seo
  • graphql
  • next.js
suny_fun 댓글 2 좋아요 0 조회수 443

이미지 업로드 후 url 접속 에러와 관련해서 질문드립니다. (섹션 19)

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

이미지를 업로드 후 받아오는 url을 통해, 이미지를 로딩해오는 과정에서 오류가 발생해서 질문드립니다. data는 uploadFile mutation 후 받아온 result에 대한 출력 결과이고, 여기서 받아온 url을 https://storage.googleapis.com/ . 뒤에 붙여서 이미지를 불러오려고 하면 오류가 발생합니다. 이 부분에 대한 에러를 해결할 수가 없어서 질문드립니다.

  • react
  • node.js
  • seo
  • graphql
  • next.js
김민규 댓글 1 좋아요 0 조회수 495

API Routes로 변경 후 JSON 오류

해결됨

Next.js 시작하기(feat. 지도 서비스 개발)

안녕하세요 강사님. 먼저 강의 감사히 잘 듣고 있습니다. 다름이 아니라 API Routes로 프로젝트를 변경한 이후 아래와 같은 에러가 발생합니다. 아래 자막에 달아 두신 것과 같이 .env파일도 정상적으로 배포한 사이트로 바꿔 두었고 혹시몰라 JSON파일에 대한 파싱문제가 있는것인지 확인하고 싶습니다. https://github.com/eugene028/NextJsMap github주소도 남깁니다. 잘 되다가 API Routes로 변경하니까 이런 에러가 뜨네요!! ㅜㅜ

  • seo
  • next.js
  • vercel
  • csr
  • ssg
  • ssr
김유진 댓글 1 좋아요 1 조회수 454

geolocation 메소드 사용 시 콘솔창 알림

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

지올로케이션으로 위치 나타내는 함수 배우는데 콘솔창 맨 위에 [Violation] Only request geolocation information in response to a user gesture. 이렇게라고 떠요. 해당 자바스크립트 번호 보니까 딱히 문제 될 것도 없고 강사님이랑 똑같이 적었는데 왜 저렇게 뜰까요?

  • react
  • node.js
  • seo
  • graphql
  • next.js
치카치카 댓글 1 좋아요 0 조회수 1123

rerender

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

emotion에 props 던지기 및 setState의 작동원리강의 49분경 설명에서.... 작성자,제목,내용 인풋창에 q,q,q를 입력하는 과정에서 최종적으로 내용인풋에 q입력할때 처음에는 contents값이 없는 상태로 렌더링이 일어나고 42번째 함수가 종료가 될때, (임시로 저장해두었던 q) contents를 q로 바꾸라고 알아들어서 바꾸면 한번더 리렌더링이 일어나서 contents 값이 q가되어 있으므로 44번째 if문이 실행이 되어서 45번째 setMycolor가 실행이 되고, 또 다시 setMycolor가 바뀌므로 리렌더링 일어나서 버튼색이 노란색으로 바껴야 하는거 아닌가요? 왜 내용에 qw를 입력하는 순간 이 일이 일어나나요?

  • react
  • node.js
  • seo
  • graphql
  • next.js
H,S 댓글 1 좋아요 0 조회수 438

나의 상품 카운트 API 질문

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

안녕하세요. 언제나 좋은 강의 감사합니다! 다름이 아니라 section 14 과제인 마이페이지를 구현하는 중인데 나의 상품 페이지 pagination에 사용할 내 장터-나의 상품 count API는 어떤 걸 쓰면 될까요? 다른 페이지에서 사용할 count API는 모두 있는 것 같데 나의 상품만 없는 건지 제가 못 찾고 있는 건지 모르겠네요..

  • react
  • node.js
  • seo
  • graphql
  • next.js
Hephaestus 댓글 1 좋아요 0 조회수 320

logoutUser 로그아웃 방법

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

로그인은 가능한데 로그아웃은 어떻게 하는지 모르겠습니다 ㅠ logoutUser mutation으로 해도 에러가 떠서 찾아봐도 강의에 나와있지 않아서 글 남깁니다!!

  • react
  • node.js
  • seo
  • graphql
  • next.js
호겸 댓글 1 좋아요 0 조회수 563

노션 쓰는거

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

안녕하세요 취업할때 공부한 걸 블로그나 노션에 기록해뒀다가 주소를 이력서에 첨부하면 좋다고 들었는데요 노션에 공부노트 템플릿으로 저렇게 수업내용 같은거 작성하고 있는데 제가 노션이 익숙치 않아서ㅜㅜ 이런식으로 해서 주소첨부해도 괜찮은 게 맞나요? 혹시 팁이 있다면 알려주세요~^^

  • react
  • node.js
  • seo
  • graphql
  • next.js
혜인 댓글 1 좋아요 0 조회수 750

복습 정리

해결됨

[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스

안녕하세요 혹시 강의 내용을 복습할 때 깃허브나 블로그에 정리 요약 해서 업로드 해도 될까요?

  • react
  • node.js
  • seo
  • graphql
  • next.js
댓글 1 좋아요 0 조회수 445

인기 태그

인프런 TOP Writers

주간 인기글