inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

flutter doctor 실행 했을 때 안드로이드스튜디오 - java 관련 경고가 나타납니다.

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

flutter doctor 실행 했을 때 안드로이드스튜디오 - java 관련 경고가 나타납니다. 에러가 아닌 경고라서 진행에 문제가 없을 것으로 생각이 됩니다만 해결하고 싶어서 구글에 검색을 해봐도 해결 방법을 모르겠습니다.

  • flutter
  • 클론코딩
  • Flutter
  • 클론코딩
  • m1세팅
  • 안드로이드스튜디오
  • java
김재민 댓글 1 좋아요 0 조회수 589

textStyle 변수 선언의 위치

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

수업 잘 듣고 있습니다. 내용 중 build 안에서 textStyle 을 선언해 사용하는데, build 안과 밖의 차이 를 알고 싶고 build 안에서는 계속 필요할 경우 rendering 되는데 위와 같은 경우는 밖으로 내는 것은 어떤가요? 물론 StatelessWidget이지만.. 궁금해 문의합니다.

  • flutter
  • 클론코딩
  • Flutter
  • 클론코딩
SY. Jeoung 댓글 2 좋아요 0 조회수 379

TypeORM 에러 및 middleware 설치 이후 cors 에러 문의드립니다.

미해결

따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)

안녕하세요, 강사님! 강의 듣던 도중 해결하지 못한 에러가 있어 조언해주실 수 있으신지 문의드립니다. 1 TypeORM에서 다음과 같은 에러가 뜹니다. Server running at http://localhost:4000 QueryFailedError: tables can have at most 1600 columns at PostgresQueryRunner.query (생략) { query: 'ALTER TABLE "posts" ADD "title" character varying NOT NULL', parameters: undefined, driverError: error: tables can have at most 1600 columns at Parser.parseErrorMessage (생략) { length: 100, severity: 'ERROR', code: '54011', detail: undefined, hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'tablecmds.c', line: '6819', routine: 'ATExecAddColumn' }, length: 100, severity: 'ERROR', code: '54011', detail: undefined, hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'tablecmds.c', line: '6819', routine: 'ATExecAddColumn' } <== 이 부분이 계속 반복됩니다 (반복적으로 테이블이 생성되는 듯) stackoverflow 를 찾아보니 oneToMany relation이 문제가 된다는 글을 봤는데... 제가 백앤드쪽 지식이 전무하다보니, oneToMany 데코레이터로 설정된 Entity를 어떻게 수정해야하는건지 잘 모르겠고, 강사님 코드와 동일하게 작성한 것 같은데 뭐가 문젠지 잘 모르겠습니다. 특히나 아래 코드 중, { length: 100, severity: 'ERROR', .... } 이 부분이 반복적으로 로그에 찍히는데 어떻게 해결해야할지 잘 모르겠습니다. 이 글 을 보니, nomarlization을 진행하라는데 이게 맞는 솔루션인가요? 백앤드 해보고 싶어서 아는 것 없이 무작정 따라하는 중인데, 지식이 부족해서 제대로 된 해결방법이 뭔지 알 수가 없네요.. 2 middleware 설치 전까지는 회원가입 기능이 잘 되었었는데, middleware 설치 이후로는, 로컬호스트 3000에서 cors 에러가 뜹니다. (아래 이미지 첨부) 로그인, 회원가입 기능 어떤것도 되지 않는 상태이고, token도 생성되지 않습니다. 일단 계속해서 강의를 듣고 있는데 에러 해결이 안되어 더이상 진도를 나갈 수가 없어서 문의남깁니다 ㅠㅠ Access to XMLHttpRequest at 'http://localhost:4000/api/auth/me' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. { "message": "Network Error", "name": "AxiosError", "stack": "AxiosError: Network Error\n at XMLHttpRequest.handleError (webpack-internal:///./node_modules/axios/lib/adapters/xhr.js:168:14)", "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "adapter": [ "xhr", "http" ], "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": {}, "headers": { "Accept": "application/json, text/plain, /" }, "baseURL": "http://localhost:4000/api", "withCredentials": true, "method": "get", "url": "/auth/me" }, "code": "ERR_NETWORK", "status": null } 나름대로 검색도 해보고, node_modules 싹 날리고 재설치해봤으나.. ㅠㅠ 답변 기다리겠습니다 감사합니다

  • Next.js
  • node.js
  • 클론코딩
  • postgresql
  • react
  • nodejs
  • 클론코딩
  • next.js
  • docker
  • typescript
sharonhana12 댓글 2 좋아요 0 조회수 824

EachDM의 왼쪽에 있는 동그라미의 색깔이 초록색으로 변하지 않음

미해결

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

[제로초 강좌 질문 필독 사항입니다] 질문에는 여러분에게 도움이 되는 질문과 도움이 되지 않는 질문이 있습니다. 도움이 되는 질문을 하는 방법을 알려드립니다. https://www.youtube.com/watch?v=PUKOWrOuC0c 0. 숫자 0부터 시작한 이유는 1보다 더 중요한 것이기 때문입니다. 에러가 났을 때 해결을 하는 게 중요한 게 아닙니다. 왜 여러분은 해결을 못 하고 저는 해결을 하는지, 어디서 힌트를 얻은 것이고 어떻게 해결한 건지 그걸 알아가셔야 합니다. 그렇지 못한 질문은 무의미한 질문입니다. 1. 에러 메시지를 올리기 전에 반드시 스스로 번역을 해야 합니다. 번역기 요즘 잘 되어 있습니다. 에러 메시지가 에러 해결 단서의 90%를 차지합니다. 한글로 번역만 해도 대부분 풀립니다. 그냥 에러메시지를 올리고(심지어 안 올리는 분도 있습니다. 저는 독심술사가 아닙니다) 해결해달라고 하시면 아무런 도움이 안 됩니다. 2. 에러 메시지를 잘라서 올리지 않아야 합니다. 입문자일수록 에러메시지에서 어떤 부분이 가장 중요한 부분인지 모르실 겁니다. 그러니 통째로 올리셔야 합니다. 3. 코드도 같이 올려주세요. 다만 코드 전체를 다 올리거나, 깃헙 주소만 띡 던지지는 마세요. 여러분이 "가장" 의심스럽다고 생각하는 코드를 올려주세요. 4. 이 강좌를 바탕으로 여러분이 응용을 해보다가 막히는 부분, 여러 개의 선택지 중에서 조언이 필요한 부분, 제 경험이 궁금한 부분에 대한 질문은 대환영입니다. 다만 여러분의 회사 일은 질문하지 마세요. 5. 강좌 하나 끝날 때마다 남의 질문들을 읽어보세요. 여러분이 곧 만나게 될 에러들입니다. 6. 위에 적은 내용을 명심하지 않으시면 백날 강좌를 봐도(제 강좌가 아니더라도) 실력이 늘지 않고 그냥 코딩쇼 관람 및 한컴타자연습을 한 셈이 될 겁니다.

  • Socket.io
  • typescript
  • socket.io
  • babel
  • 웹팩
  • react
  • 클론코딩
  • 클론코딩
songkim5787 댓글 3 좋아요 0 조회수 589

DM List와 Channel List에서 CollapseButton을 누르면 CollapseButton의 왼편에 있는 화살표가 아래로 향해야 하는데 변하지 않습니다.

미해결

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

[제로초 강좌 질문 필독 사항입니다] 질문에는 여러분에게 도움이 되는 질문과 도움이 되지 않는 질문이 있습니다. 도움이 되는 질문을 하는 방법을 알려드립니다. https://www.youtube.com/watch?v=PUKOWrOuC0c 0. 숫자 0부터 시작한 이유는 1보다 더 중요한 것이기 때문입니다. 에러가 났을 때 해결을 하는 게 중요한 게 아닙니다. 왜 여러분은 해결을 못 하고 저는 해결을 하는지, 어디서 힌트를 얻은 것이고 어떻게 해결한 건지 그걸 알아가셔야 합니다. 그렇지 못한 질문은 무의미한 질문입니다. 1. 에러 메시지를 올리기 전에 반드시 스스로 번역을 해야 합니다. 번역기 요즘 잘 되어 있습니다. 에러 메시지가 에러 해결 단서의 90%를 차지합니다. 한글로 번역만 해도 대부분 풀립니다. 그냥 에러메시지를 올리고(심지어 안 올리는 분도 있습니다. 저는 독심술사가 아닙니다) 해결해달라고 하시면 아무런 도움이 안 됩니다. 2. 에러 메시지를 잘라서 올리지 않아야 합니다. 입문자일수록 에러메시지에서 어떤 부분이 가장 중요한 부분인지 모르실 겁니다. 그러니 통째로 올리셔야 합니다. 3. 코드도 같이 올려주세요. 다만 코드 전체를 다 올리거나, 깃헙 주소만 띡 던지지는 마세요. 여러분이 "가장" 의심스럽다고 생각하는 코드를 올려주세요. 4. 이 강좌를 바탕으로 여러분이 응용을 해보다가 막히는 부분, 여러 개의 선택지 중에서 조언이 필요한 부분, 제 경험이 궁금한 부분에 대한 질문은 대환영입니다. 다만 여러분의 회사 일은 질문하지 마세요. 5. 강좌 하나 끝날 때마다 남의 질문들을 읽어보세요. 여러분이 곧 만나게 될 에러들입니다. 6. 위에 적은 내용을 명심하지 않으시면 백날 강좌를 봐도(제 강좌가 아니더라도) 실력이 늘지 않고 그냥 코딩쇼 관람 및 한컴타자연습을 한 셈이 될 겁니다.

  • typescript
  • babel
  • 웹팩
  • socket.io
  • Socket.io
  • react
  • 클론코딩
  • 클론코딩
songkim5787 댓글 3 좋아요 0 조회수 399

react-router-dom v6 오류

미해결

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

다른분들의 질문들을 보면서 수정을 해보았지만 해결되지 않아 질문 올립니다. -react-router-dom 버전으로 인해 swtch는 Routes로 바꾸었으며 worspace뒤에 *을 붙였습니다. //App.ts <Routes> <Route path="/" element={<Navigate replace to="/login" />} /> <Route path="/login" element={<LogIn />} /> <Route path="/signup" element={<SignUp />} /> <Route path="/workspace/:workspace/*" element={<Workspace />} /> </Routes> workspace.tsx 에서는 밑에 코드로 바꾸었습니다. //Workspace.tsx <Routes> <Route path="channel/:channel" element={<Channel />} /> <Route path="dm/:id" element={<DirectMessage />} /> </Routes> 그리고 나서 login 은 잘 되고 쿠키도 잘 저장되지만 http://localhost:3090/workspace/sleact/channel/%EC%9D%BC%EB%B0%98 이 주소로 가면 아래 같은 에러가 뜨면서 창이 뜨지 않습니다. 어떤게 잘못된 걸까요 ㅠ TypeError Cannot read properties of undefined (reading 'match') Call Stack useParams alecture/./node_modules/react-router/esm/react-router.js:760:34 ChannelList alecture/./components/ChannelList/index.tsx:40:75 renderWithHooks alecture/./node_modules/react-dom/cjs/react-dom.development.js:14985:18 mountIndeterminateComponent alecture/./node_modules/react-dom/cjs/react-dom.development.js:17811:13 beginWork alecture/./node_modules/react-dom/cjs/react-dom.development.js:19049:16 HTMLUnknownElement.callCallback alecture/./node_modules/react-dom/cjs/react-dom.development.js:3945:14 Object.invokeGuardedCallbackDev alecture/./node_modules/react-dom/cjs/react-dom.development.js:3994:16 invokeGuardedCallback alecture/./node_modules/react-dom/cjs/react-dom.development.js:4056:31 beginWork$1 alecture/./node_modules/react-dom/cjs/react-dom.development.js:23959:7 performUnitOfWork alecture/./node_modules/react-dom/cjs/react-dom.development.js:22771:12

  • babel
  • Socket.io
  • react
  • socket.io
  • 웹팩
  • typescript
  • 클론코딩
  • 클론코딩
aso 댓글 2 좋아요 0 조회수 635

router.js:954 No routes matched location 에러가 발생합니다.

해결됨

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

안녕하세요 제로초님, 현재 react-router-dom v6.6.2로 강의를 수강하고 있습니다. 앞부분에서 잘 따라하다가 어느 부분에서 잘못된 것인지 로그인을 했을 때 흰 화면과 함께 아래 첨부한 사진과 같은 에러가 발생하했습니다. API를 받아올 때 사용하는 params에 문제가 있나 싶었지만, http://localhost:3095/api/workspaces/sleact/channels 이 주소로 들어갔을 때 아래와 같은 데이터를 받아오는 것을 확인할 수 있었습니다. [ { "id": 1, "name": "일반", "private": false, "createdAt": "2023-01-26T08:07:33.000Z", "updatedAt": "2023-01-26T08:07:33.000Z", "WorkspaceId": 1, "Members": [ { "id": 2, "ChannelMembers": { "UserId": 2 } } ] } ] 데이터가 문제인가 싶어서 테이블도 삭제했다가 다시 만들어봤지만 해결할 수 없었습니다ㅠㅠ 어떻게 해결할 수 있을까요?? 혹시 몰라 코드는 모두 첨부하겠습니다! // App/index.tsx import React from 'react'; import loadable from '@loadable/component'; import { Routes, Route, Navigate } from 'react-router-dom'; const Login = loadable(() => import('@pages/Login')); const SignUp = loadable(() => import('@pages/SignUp')); const Workspace = loadable(() => import('@layouts/Workspace')); const App = () => { return ( <Routes> <Route path="/" element={<Navigate to="/login" />} /> <Route path="/login" element={<Login />} /> <Route path="/signup" element={<SignUp />} /> <Route path="/workspace/:workspace" element={<Workspace />} /> </Routes> ); }; export default App; // Workspace/index.tsx import React, { useCallback, useEffect, useState } from 'react'; import useSWR from 'swr'; import axios from 'axios'; import fetcher from '@utils/fetcher'; import gravatar from 'gravatar'; import { Navigate, Route, Routes } from 'react-router'; import { AddButton, Channels, Chats, Header, LogOutButton, MenuScroll, ProfileImg, ProfileModal, RightMenu, WorkspaceButton, WorkspaceModal, WorkspaceName, Workspaces, WorkspaceWrapper, } from './styles'; import loadable from '@loadable/component'; import Menu from '@components/Menu'; import { Link } from 'react-router-dom'; import { IChannel, IUser } from '@typings/db'; import Modal from '@components/Modal'; import { Button, Input, Label } from '@pages/SignUp/styles'; import useInput from '@hooks/useInput'; import { toast } from 'react-toastify'; import CreateChannelModal from '@components/CreateChannelModal'; import { useParams } from 'react-router'; const Channel = loadable(() => import('@pages/Channel')); const DirectMessage = loadable(() => import('@pages/DirectMessage')); const Workspace = () => { const [showUserMenu, setShowUserMenu] = useState(false); const [showCreateWorkspaceModal, setShowCreateWorkspaceModal] = useState(false); const [showWorkspaceModal, setShowWorkspaceModal] = useState(false); const [showCreateChannelModal, setShowCreateChannelModal] = useState(false); const [newWorkspace, onChangeNewWorkspace, setNewWorkspace] = useInput(''); const [newUrl, onChangeNewUrl, setNewUrl] = useInput(''); const params = useParams<{ workspace?: string }>(); const { workspace } = params; const { data: userData, error, mutate } = useSWR<IUser | false>('http://localhost:3095/api/users', fetcher); const { data: channelData } = useSWR<IChannel[]>( userData ? `http://localhost:3095/api/workspaces/${workspace}/channels` : null, fetcher, ); const onLogout = useCallback(() => { axios .post('http://localhost:3095/api/users/logout', null, { withCredentials: true, }) .then(() => { mutate(false, false); }); }, []); const onClickUserProfile = useCallback(() => { setShowUserMenu((prev) => !prev); }, []); const onCloseUserProfile = useCallback((e: React.MouseEvent) => { e.stopPropagation(); setShowUserMenu(false); }, []); const onClickCreateWorkspace = useCallback(() => { setShowCreateWorkspaceModal((prev) => !prev); }, []); const onCreateWorkspace = useCallback( (e: React.FormEvent) => { e.preventDefault(); // 필수 값이 들어있는지 검사 if (!newWorkspace || !newWorkspace.trim()) return; if (!newUrl || !newUrl.trim()) return; axios .post( 'http://localhost:3095/api/workspaces', { workspace: newWorkspace, url: newUrl, }, { withCredentials: true }, ) .then(() => { mutate(); setShowCreateWorkspaceModal(false); setNewWorkspace(''); setNewUrl(''); }) .catch((error) => { console.dir(error); toast.error(error.response?.data, { position: 'bottom-center' }); }); }, [newWorkspace, newUrl], ); const onCloseModal = useCallback(() => { setShowCreateWorkspaceModal(false); setShowCreateChannelModal(false); }, []); const onClickAddChannel = useCallback(() => { setShowCreateChannelModal(true); }, []); const toggleWorkspaceModal = useCallback(() => { setShowWorkspaceModal((prev) => !prev); }, []); if (!userData) { return <Navigate to="/login" />; } return ( <div> <Header> <RightMenu> <span onClick={onClickUserProfile}> <ProfileImg src={gravatar.url(userData.email, { s: '28px', d: 'retro' })} alt={userData.email} /> <Menu style={{ right: 0, top: 38 }} show={showUserMenu} onCloseModal={onCloseUserProfile}> <ProfileModal> <img src={gravatar.url(userData.email, { s: '36px', d: 'retro' })} alt={userData.email} /> <div> <span id="profile-name">{userData.nickname}</span> <span id="profile-active">Active</span> </div> </ProfileModal> <LogOutButton onClick={onLogout}>로그아웃</LogOutButton> </Menu> </span> </RightMenu> </Header> <WorkspaceWrapper> <Workspaces> {userData?.Workspaces?.map((ws) => { return ( <Link key={ws.id} to={`${ws.url}/channel/일반`}> <WorkspaceButton>{ws.name.slice(0, 1).toUpperCase()}</WorkspaceButton> </Link> ); })} <AddButton onClick={onClickCreateWorkspace}>+</AddButton>; </Workspaces> <Channels> <WorkspaceName onClick={toggleWorkspaceModal}>Sleact</WorkspaceName> <MenuScroll> <Menu style={{ top: 95, left: 80 }} show={showWorkspaceModal} onCloseModal={toggleWorkspaceModal}> <WorkspaceModal> <h2>Sleact</h2> <button onClick={onClickAddChannel}>채널 만들기</button> <button onClick={onLogout}>로그아웃</button> </WorkspaceModal> </Menu> {channelData?.map((v) => ( <div>{v.name}</div> ))} </MenuScroll> </Channels> <Chats> <Routes> <Route path="/:workspace/channel/:channel" element={<Channel />} /> <Route path="/:workspace/dm/:id" element={<DirectMessage />} /> </Routes> </Chats> </WorkspaceWrapper> <Modal show={showCreateWorkspaceModal} onCloseModal={onCloseModal}> <form onSubmit={onCreateWorkspace}> <Label id="workspace-name"> <span>워크스페이스 이름</span> <Input id="workspace" value={newWorkspace} onChange={onChangeNewWorkspace} /> </Label> <Label id="workspace-label"> <span>워크스페이스 url</span> <Input id="workspace" value={newUrl} onChange={onChangeNewUrl} /> </Label> <Button type="submit">생성하기</Button> </form> </Modal> <CreateChannelModal show={showCreateChannelModal} onCloseModal={onCloseModal} setShowCreateChannelModal={setShowCreateChannelModal} /> </div> ); }; export default Workspace; // CreateChannel/index.tsx import Modal from '@components/Modal'; import useInput from '@hooks/useInput'; import { Button, Input, Label } from '@pages/SignUp/styles'; import { IChannel, IUser } from '@typings/db'; import fetcher from '@utils/fetcher'; import axios from 'axios'; import React, { useCallback } from 'react'; import { useParams } from 'react-router'; import { toast } from 'react-toastify'; import useSWR from 'swr'; interface Props { show: boolean; onCloseModal: () => void; setShowCreateChannelModal: (flag: boolean) => void; } const CreateChannelModal: React.FC<Props> = ({ show, onCloseModal, setShowCreateChannelModal }) => { const [newChannel, onChangeNewChannel, setNewChannel] = useInput(''); const params = useParams<{ workspace?: string }>(); const { workspace } = params; const { data: userData, error, mutate } = useSWR<IUser | false>('http://localhost:3095/api/users', fetcher); const { mutate: mutateChannel } = useSWR<IChannel[]>( userData ? `http://localhost:3095/api/workspaces/${workspace}/channels` : null, fetcher, ); const onCreateChannel = useCallback( (e: React.FormEvent) => { e.preventDefault(); axios .post( `http://localhost:3095/api/workspaces/${workspace}/channels`, { name: newChannel, }, { withCredentials: true }, ) .then(() => { setShowCreateChannelModal(false); mutateChannel(); setNewChannel(''); }) .catch((error) => { console.dir(error); toast.error(error.response?.data, { position: 'bottom-center' }); }); }, [newChannel, workspace], ); return ( <Modal show={show} onCloseModal={onCloseModal}> <form onSubmit={onCreateChannel}> <Label id="channel-label"> <span>채널 이름</span> <Input id="workspace" value={newChannel} onChange={onChangeNewChannel} /> </Label> <Button type="submit">생성하기</Button> </form> </Modal> ); }; export default CreateChannelModal;

  • 클론코딩
  • babel
  • react
  • socket.io
  • Socket.io
  • typescript
  • 클론코딩
  • 웹팩
mihyun Lee 댓글 2 좋아요 0 조회수 7161

어드민 페이지 문의

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

안녕하세요~ 궁금한게 있어 문의 드립니다. 강의랑은 살짝 관련없지만 관련있는 문의 입니다. 혹시 플러터 앱을 제작 후 (쇼핑몰) 웹에서 별도 어드민 페이지를 만들어서 플러터 앱과 json으로 연동하는 방법이 있을까요? 그리고 admin페이지 역시 플로터로 개발하는게 좋을지 아니면 장고나 스프링이나 다른 언어에 프레임워크로 연결이 될런지 궁금해서 문의드립니다!

  • flutter
  • Flutter
  • 클론코딩
  • 클론코딩
LEE GEFF 댓글 1 좋아요 0 조회수 414

문법 관련 질문있습니다.

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

0:08:30 쯤에 설명하신 this 키워드에 관해 질문있습니다. 영상에서 설명하신 내용은 이해가 됐습니다. 제가 영상과는 다르게 객체 내의 name과 members 생성자를 다른 임의의 문자열과 리스트로 정의하고 Idol생성자를 Idol( this.name , this.members); 로 바꾸고 출력해 봤습니다. 이때, Idol 생성자의 변수가 클래스 내의 생성자 갑과는 무관하게 파라미터의 값을 받는것 같습니다. 왜 파라미터안에 this를 선언했음에도 왜 클래스 내의 생성자 값을 받지 않는지 궁금합니다.

  • flutter
  • Flutter
  • 클론코딩
  • 클론코딩
한동규 댓글 1 좋아요 0 조회수 308

npm run dev 실행 오류

미해결

따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)

npm run dev 로 server.ts 실행시, 에러가 발생합니다. 찾아보니, db 연결 시 인증에 관련된 오류 같은데... 어떻게 해야할지 잘 모르겠습니다. 오타 꼼꼼히 확인하고 docker-compose도 다시 실행 해봤는데 해결이 되지 않네요. 제가 수업 듣기 전에 pg-admin을 설치했었는데, 그것과 관련 있는 걸까요?

  • node.js
  • nodejs
  • react
  • postgresql
  • typescript
  • docker
  • 클론코딩
  • next.js
  • 클론코딩
  • Next.js
히히 댓글 1 좋아요 0 조회수 581

에뮬레이터 실행 시 오류

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

안녕하세요. 코드팩토리님. flutter 설치 후 에뮬레이터 실행 시 오류가 발생하네요. 강의 그대로 따라한것 같은데 뭐가 잘못된걸 까요. 구글링으로 해결하려했는데 너무 많은 시간을 소비해서 답답한 마음에 글 남겨봅니다. SDK 설치도 강의 내용대로 했던 것 같습니다... 다만 flutter doctor -android -licenses 진행할때 jdk 버전이 안맞아서 java쪽 환경설정 재 설정 해줬구요. 11버전으로 맞춰줬습니다. 혹시 이 문제 때문일까요? 디스크용량이 없으면 에뮬레이터 오류가 난다는데 여유 공간 30GB 있습니다. 아니면 환경변수를 추가로 해줘야하나요? 구글에 찾아보니 ANDROID_AVD_HOME, ANDROID_SDK_HOME 등등 사용자변수쪽에 새로운 폴더 만들고 연결해주라는데... 이것들 다 해봐도 안됩니다... 꼭 좀 도와주세요. 시스템 환경 변수 설정(앞에 경로는 사용자때문에 잘랐습니다) SDK 설치 에뮬레이터 실행 시 오류

  • flutter
  • Flutter
  • 클론코딩
  • 클론코딩
서하파덜 댓글 1 좋아요 0 조회수 672

sqlite 오류문제로 질문드립니다.

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

색상정보DB에 넣기 강의에서 hexCode 넣는 부분에서 밑의 오류가 뜨는데 이게 왜 생기는지 모르겠습니다. Unhandled Exception: SqliteException(1299): NOT NULL constraint failed: category_colors.id, constraint failed (code 1299) Causing statement: INSERT INTO "category_colors" ("hex_code") VALUES (?)

  • flutter
  • 클론코딩
  • Flutter
  • 클론코딩
1907Heidsieck 댓글 1 좋아요 0 조회수 539

argument 이름에 대해서 궁금합니다.

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

CustomTextField( label: '내용', isTime: false, onSaved: onSaved, initialValue: initialValue, ), 안녕하세요. 두 가지 질문이 있습니다. 위 위젯을 예시로 onSaved: onSaved 에서 왼쪽은 parameter, 오른쪽은 argument 라고 부르는 것이 맞을까요? 강의의 대부분에서 저렇게 오른쪽의 argument를 따로 빼서 넣어주는 경우 왼쪽의 parameter와 이름이 같게 넣어주시는 경우가 많은데 현업에서는 대부분 이런 식으로 작성하나요? 변수 네이밍이나, 코드 작성은 주관적인 것이지만, 어떤 것이 좋은 코드인지 또 현업에서는 어떻게 쓰는지 궁금합니다.

  • flutter
  • 클론코딩
  • 클론코딩
  • Flutter
dubai 댓글 1 좋아요 0 조회수 350

배포후 로컬에서 Index.html 열면 작동이 잘 안하는 이유

미해결

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

백엔드에 배포하려고 파일 넘기기 전에,, 빌드가 잘 되었는지 테스트해보려고 (백엔드 먼저 켜두고) index.html을 그냥 브라우저로 열면 백엔드와 잘 연동될줄 알았는데, 첫 화면부터 보이지가 않아서요. 그 이유가 궁금합니다. 이유가 혹시,,, 웹펙에서 devServer: { historyApiFallback: true, // react router(원래 SPA에서는 3090/ 주소밖에 모른다. 뒤에 /login같은 경로는 우리가 가짜로 만들어낸건데 History api(History 기본함수)가 가짜주소를 만들어주는 거다.) port: 3090, devMiddleware: { publicPath: '/dist/' }, static: { directory: path.resolve(__dirname) }, proxy: { '/api/': { //프론트에서 /api/로 보내는 요청은 주소를 3095로 바꿔서 보내겠다 target: 'http://localhost:3095', changeOrigin: true, }, }, }, 위와 같이 dev모드일때는 3090포트 개발서버를 항상 켜두는데, 이처럼 뭔가 서버가 계속 켜있어야 프론트가 잘 작동 가능한건가요?? (그래서 배포할때 백엔드서버는 항상 켜있으니까 그냥 넘겨주면 된다는게 이해가 되는거 같아서요) 만약 그렇다면 프론트인데 빌드 결과물이 있는데 왜 계속 프론트만을 위한 서버가 켜있어야 하는지 궁금합니다,, 저는 배포파일이 실행파일마냥 그냥 index.html 실행하면 (백엔드 켜져있어서 통신할 수 있다는 가정하에) 알아서 잘 되는줄 알았거든요,,

  • 웹팩
  • typescript
  • babel
  • socket.io
  • react
  • babel
  • 클론코딩
  • Socket.io
  • 클론코딩
초간단 댓글 1 좋아요 0 조회수 596

3:30 에 제공해드린 파일이 어디있나요..?

미해결

실전! 웹사이트제작! Step By Step! ('포메인'_풀페이지사이트 제작)

3:30 에 제공해드린 파일이 어디있나요..? 최종결과물 파일 외에 또 새로운 파일을 어디에서 받아야하는건가요..? 카운트업 js 랑 플러그인 js는 어디서 받아야하는건가요,,?

  • jquery
  • 인터랙티브-웹
  • 클론코딩
  • 인터랙티브-웹
  • 클론코딩
office 댓글 0 좋아요 0 조회수 309

Cannot read properties of undefined (reading 'map')

미해결

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

제로초님, 코드를 따라친 후에 로그아웃을 하고 다시 로그인 하면 이런 에러메세지가 뜹니다. 그런데 네트워크 탭을 보면 로그인이 정상적으로 된거 같아서 새로고침을 하면 에러 메세지가 사라지고 슬랙에서 로그인된 화면이 제대로 뜹니다. 근데 또 여기서 워크스페이스를 생성하려고 하면 콘솔에 axioserror메세지가 떠서 어떻게 해야될지 모르겠습니다.. Workspace/index.tsx import axios from "axios"; import React, { FC, useCallback, useState } from "react"; import useSWR from 'swr'; import fetcher from "@utils/fetcher"; import { Navigate, Routes, Route } from "react-router-dom"; import { AddButton, Channels, Chats, Header, LogOutButton, MenuScroll, ProfileImg, ProfileModal, RightMenu, WorkspaceButton, WorkspaceName, Workspaces, WorkspaceWrapper } from "@layouts/Workspace/style"; import gravatar from 'gravatar'; import loadable from '@loadable/component'; import Menu from "../../components/Menu"; import Modal from "../../components/Modal"; import { Link } from "react-router-dom"; import { IUser } from "@typings/db"; import { Button, Input, Label } from "@pages/SignUp/styles"; import useInput from "@hooks/useInput"; import {toast} from 'react-toastify'; const Channel = loadable(() => import('@pages/Channel')); const DirectMessage = loadable(() => import('@pages/DirectMessage')); const Workspace: FC<React.PropsWithChildren<{}>> = ({children}) => { const [showUserMenu, setShowUserMenu] = useState(false); const [showCreateWorkspaceModal, setShowCreateWorkspaceModal] = useState(false); const [newWorkspace, onChangeNewWorkspace, setNewWorkspace] = useInput(''); const [newUrl, onChangeNewUrl, setNewUrl] = useInput(''); // revalidate = 서버로 요청 다시 보내서 데이터를 다시 가져옴 // mutate = 서버에 요청 안보내고 데이터를 수정 const {data: userData, error, mutate} = useSWR<IUser | false>('/api/users', fetcher, { dedupingInterval: 2000, }); const onLogout = useCallback(() => { axios.post('/api/users/logout', null , { withCredentials: true, }) .then(() => { mutate(false, false); }) }, []); const onClickUserProfile = useCallback((e: any) => { e.stopPropagation(); setShowUserMenu((prev) => !prev); }, []) const onClickCreateWorkspace = useCallback(() => { setShowCreateWorkspaceModal(true); }, []) const onCreateWorkspace = useCallback((e: any) => { e.preventDefault(); // 띄어쓰기도 검사해줘야됨 if(!newWorkspace || !newWorkspace.trim()) return; if(!newUrl || !newUrl.trim()) return; axios.post('http://localhost:3095/api/workspaces', { workspace: newWorkspace, url: newUrl, }, { withCredentials: true, }) .then(() => { mutate(); setShowCreateWorkspaceModal(false); setNewWorkspace(''); setNewUrl(''); }) .catch((error) => { console.dir(error); // 에러가 나면 사용자가 인지하게 해줌 toast.error(error.response?.data, { position: 'bottom-center' }) }) }, [newWorkspace, newUrl]) const onCloseModal = useCallback(() => { setShowCreateWorkspaceModal(false); }, []) if(!userData) { return <Navigate to="/login" /> } if(!userData) return null; return( <div> <Header> <RightMenu> <span onClick={onClickUserProfile}> <ProfileImg src={gravatar.url(userData.email, { s: '28px', d: 'retro' })} alt={userData.nickname} /> {showUserMenu && <Menu style={{ right: 0, top: 38 }} show={showUserMenu} onCloseModal={onClickUserProfile}> <ProfileModal> <img src={gravatar.url(userData.nickname, { s: '36px', d: 'retro' })} alt={userData.nickname} /> <div> <span id="profile-name">{userData.nickname}</span> <span id="profile-active">Active</span> </div> </ProfileModal> <LogOutButton onClick={onLogout}>로그아웃</LogOutButton> </Menu>} </span> </RightMenu> </Header> <WorkspaceWrapper> <Workspaces> {userData?.Workspaces.map((ws) => { return ( <Link key={ws.id} to={`/workspace/${123}/channel/일반`}> <WorkspaceButton>{ws.name.slice(0, 1).toUpperCase()}</WorkspaceButton> </Link> ); })} <AddButton onClick={onClickCreateWorkspace}>+</AddButton> </Workspaces> <Channels> <WorkspaceName>Sleact</WorkspaceName> <MenuScroll>menu scroll</MenuScroll> </Channels> <Chats> <Routes> <Route path="/channel" element={<Channel />} /> <Route path="/dm" element={<DirectMessage />} /> </Routes> </Chats> {/* Input이 들어있으면 별도의 컴포넌트로 빼는 것을 추천(input에 글자를 입력할 때마다 여기 있는 함수들이 다 리렌더링 되기 때문에 비효율적) */} </WorkspaceWrapper> <Modal show={showCreateWorkspaceModal} onCloseModal={onCloseModal}> <form onSubmit={onCreateWorkspace}> <Label id="workspace-label"> <span>워크스페이스 이름</span> <Input id="workspace" value={newWorkspace} onChange={onChangeNewWorkspace} /> </Label> <Label id="workspace-url-label"> <span>워크스페이스 이름</span> <Input id="workspace" value={newUrl} onChange={onChangeNewUrl} /> </Label> <Button type="submit">생성하기</Button> </form> </Modal> </div> ) } export default Workspace; Modal/index.tsx import React, { useCallback, FC } from "react"; import { CloseModalButton, CreateModal } from "./style"; interface Props { show: boolean; onCloseModal: () => void; children: React.ReactNode; } const Modal: FC<Props> = ({show, children, onCloseModal}) => { const stopPropagation = useCallback((e: any) => { e.stopPropagation() }, []); if(!show){ return null; } return( <CreateModal onClick={onCloseModal}> <div onClick={stopPropagation}> <CloseModalButton onClick={onCloseModal}>&times;</CloseModalButton> {children} </div> </CreateModal> ); }; export default Modal; swr2.0 버전, react v18, typescript v18 swr을 최신버전 사용해서 revalidate대신 mutate를 사용했는데 제가 잘못 사용한건지 모르겠습니다.

  • 클론코딩
  • babel
  • socket.io
  • typescript
  • 웹팩
  • 클론코딩
  • react
  • Socket.io
성창수 댓글 2 좋아요 0 조회수 1890

TableCalender 질문입니다..!

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

사진 올린것같이 state 에다 selectedDay값을 받고 onDaySelected함수에 setState를 실행시켰습니다. 다하고 나서 에뮬레이터를 확인해보니 선택한 날짜에 동그라미가 안생기더라구요.. 그래서 print를 이용하여 this.selectedDay 가 파라미터의 selectedDay가 같은 지 확인을 해봤더니 다른 값으로 false가 나옵니다. onDaySelected란 함수가 달력의 날짜를 선택하면 selectedDay와 focusedDay의 값이 선택한 날짜가 되는것 아닌가요?? 문제의 원인이 뭔지 이해가 안됩니다 ㅠ 확인해보니 selectedDay의 값이 바뀌지 않고 계속 null 인것으로 나옵니다.ㅜ

  • flutter
  • 클론코딩
  • 클론코딩
  • Flutter
wjdgus003 댓글 1 좋아요 0 조회수 772

pageYOffset || scrollY

미해결

애플 웹사이트 인터랙션 클론!

안녕하세요-! 선생님께서 pageYOffset 을 사용하셨는데, 그 이유가 IE에서도 호환되기하기 위함이 맞을까요? IE를 고려하지 않는다면 scrollY 를 사용하는게 맞는지 궁금합니다.

  • html/css
  • svg
  • 인터랙티브-웹
  • 웹-디자인
  • HTML/CSS
  • 인터랙티브-웹
  • 웹 디자인
  • 클론코딩
  • javascript
  • 클론코딩
wannabeing 댓글 1 좋아요 0 조회수 769

데이터베이스 백업관련 질문있어요

미해결

[2023 코틀린 강의 무료제공] 기초에서 수익 창출까지, 안드로이드 프로그래밍 A-Z

안녕하세요 인프런에서도 수강을 하고 있습니다 다름이 아니라 TodoList 앱에서 어플을 삭제했다가 다시 설치하거나 휴대폰 이전을 할 때 데이터를 복구하고 싶어서 찾아보니까 룸 데이터베이스 파일을 저장하고 외부 저장소에 옮겼다가 다운로드를 하면 된다고는 하는데 구글링을 해봐도 답이 안 나옵니다 ㅠㅠ 혹시 강의로 알려주실 수 있으신가요?

  • kotlin
  • android
  • 클론코딩
  • 클론코딩
comst19 댓글 1 좋아요 0 조회수 478

미세먼지 Json 값 null일경우 에러

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 코드팩토리 디스코드 https://bit.ly/3HzRzUM Flutter 강의를 구매하시면 코드팩토리 디스코드 서버 플러터 프리미엄 채널에 들어오실 수 있습니다! 디스코드 서버에 들어오시고 저에게 메세지로 강의를 구매하신 이메일을 보내주시면 프리미엄 채널에 등록해드려요! 프리미엄 채널에 들어오시면 모든 질의응답 최우선으로 답변해드립니다! 안녕하세요 !! 궁금한게 있어서 질문 드립니다 지역 변경후 값 받아오는 곳에서 "jeonbuk":null 이값으로 받아오는데 jeonbuk = double.parse(json['jeonbuk'] ?? '0'), null처리 한곳에 '0' 으로 변환 해주면 에러가 나오고 Bad state: No element See also: https://flutter.dev/docs/testing/errors jeonbuk = double.parse(json['jeonbuk'] ?? '0.01' ), '0' 이상 값으로 변환하면 정상적으로 나오는데 이유가 궁금합니다 .

  • flutter
  • 클론코딩
  • 클론코딩
  • Flutter
da shin 댓글 3 좋아요 0 조회수 934

인기 태그

인프런 TOP Writers

주간 인기글