44,000원
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
강의도표에 질문드립니다
다이어그램 도표에는 읽기 전용모드라 제가 코드복사를 못하는데 읽기 전용 해제하는 방법이 있나요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
npm run dev
선생님 npm run dev 오류 문의 올린 학생입니다답변 감사합니다 귀찮게해드려서 죄송합니다새글로 github주소올려요도커는 잘실행된거같아요!https://github.com/gmdmsdud/reddit-clone-app
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
window 10 home 노트북 docker 진행시 블루스크린
지금 제가 회사에서 사용하는 것이 virtualmachin을 사용하고 있어서 docker을 같이 설치해서 진행하고 있는데 docker 설치하자마자 블루스크린 에러가 발생이 되서 window 포맷하고 재인증진행하고 다시 docker 진행하니 에러가 발생이 되더라구요 그래서 hyper-v 설정하니 이번에는 docker 블루스크린은 안나오는데 virtualmachin 설치를 할려고하니 install 자체가 안돼서 hyper-v를 비활성화 시켰는데도 install이 안되더라구요 제 노트북으로는 docker하고 virtual machin을 같이 사용할 수 없는 건가요? 아니면 제가 놓치고 있는 부분이 어떤 것일까요
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
npm run dev
안녕하세요 수업 너무재밌게듣고있습니다근데 여기서 막혀버려서 잘찾아보려고 해도 모르겠습니다데이터베이스 연결어떻게 확인하는건지 몰라서요.. PS C:\Users\DELL\Desktop\reddit-clone-app\server> npm run dev> server@1.0.0 dev> nodemon --exec ts-node ./src/server.ts[nodemon] 2.0.20[nodemon] to restart at any time, enter rs[nodemon] watching path(s): .[nodemon] watching extensions: ts,json[nodemon] starting ts-node ./src/server.tsserver running at http://localhost:4000Error: connect ECONNREFUSED 127.0.0.1:5432at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16) {errno: -4078,code: 'ECONNREFUSED',syscall: 'connect',address: '127.0.0.1',port: 5432} 오류가 나는데 pkill node 해도 안되요 PS C:\Users\DELL\Desktop\reddit-clone-app\server> pkill nodepkill : 'pkill' 용어가 cmdlet, 함수, 스크립트 파일 또는 실행할 수 있는 프로그램 이름으로 인식되지 않습니다. 이름이 정확한지 확인하고 경로가 포함된 경우 경로가 올바른지검증한 다음 다시 시도하십시오.위치 줄:1 문자:1+ pkill node+ ~~~~~+ CategoryInfo : ObjectNotFound: (pkill:String) [], CommandNotFoundException+ FullyQualifiedErrorId : CommandNotFoundException tsconfig.json{ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Projects */ // "incremental": true, /* Enable incremental compilation */ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ "experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */, "emitDecoratorMetadata": true /* Emit design-type metadata for decorated declarations in source files. */, // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ /* Modules */ "module": "commonjs" /* Specify what module code is generated. */, // "rootDir": "./", /* Specify the root folder within your source files. */ // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ // "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "resolveJsonModule": true, /* Enable importing .json files */ // "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */ /* JavaScript Support */ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ /* Emit */ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ // "declarationMap": true, /* Create sourcemaps for d.ts files. */ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ // "newLine": "crlf", /* Set the newline character for emitting files. */ // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */, // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, /* Type Checking */ "strict": false /* Enable all strict type-checking options. */, // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ "strictPropertyInitialization": false /* Check for class properties that are declared but not set in the constructor. */, // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ } } 여기서 오류가났는데 어떻게 해결해야되나요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
Invalid href passed to next/router
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 94강 13:55초를 보면 콘솔 창에 next-dev.js?3515:20 Invalid href passed to next/router: /u//r/test02/043hzrH/test44, repeated forward-slashes (//) or backslashes \ are not valid in the hre와 같은 에러가 떠있습니다. [username].tsx에서 <Link href={`/u/${comment.post?.url}`}>을 불러 올때 url에 '/r/test02/043hzrH/test44'가 담겨 오면서 슬래쉬(//)가 2번 입력되어 생기는 에러 같습니다. 제공된 소스코드에도 위와 같이 입력되어 있어요. 아래와 같이 '/'를 지우고 링크를 href에 넣어주면 에러가 사라지는데 이게 맞을까요?<Link href={`/u${comment.post?.url}`}>
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
import { User } from "../entities/User"
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.백엔드 entities에서 Post, Sub, Comment는 아래와 같이import Post from "../entities/Post" import Sub from "../entities/Sub" import Comment from "../entities/Comment"처럼 불러올 수 있게 작성하셨는데 User만import {User} from "../entities/User"중괄호를 넣어서 불러와야 합니다. export default class User extends BaseEntity 가 아닌export class User extends BaseEntity 로 작성한 이유가 있을까요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
docker-compose up 에러
이렇게 작성 후 .env 설정하고 나서 docker-compose up 진행하니깐 (root) Additional property -version is not allowed에러가 계속 발생되더라구요. 처음에 postgres 잘 생성되다가 다시 포맷하고 docker 설치하고 난 이후에 똑같은 코드로 진행했는데도 에러가 발생이 됩니다.
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
post?.voteScore undefined
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 81강을 수강중입니다.src/pages/r/[slug]/[identifier]/[slug].tsx 작성중{post.voteScore} 를 콘솔로 찍어보면 undefined가 나와서 페이지에 노출되지 않습니다.타입을 voteScore? : number 로 한게 문제인가해서 ?를 지워보았지만, 증상은 동일했고 api를 불러오면서 voteScore는 0으로 초기화되지 않은채 받는것 같아요.그러던 중 백엔드의 Post.ts를 살펴보았더니 get voteScore()를 get VoteScore()로 오타 아닌 오타를 가져가서 초기화 되지 않았단걸 알아내었습니다. 누군가에게 도움이 되시길 바라며
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
docker compose timezon 변경방법..?
안녕하세요 강의 너무 잘보고 있습니다! 감사합니다.디비의 타임존을 변경하고 싶은데 어떤 방법이 있을까여..?docker-compose.yml에서 environment TZ 로 설정하고 "data" 폴더 지우고 다시 docker compose up 했는데 잘 안되네요..; 뭔가 방식이 잘못된걸까요..?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
comments 와 votes 를 Exclude 로 하는 이유가뭔가요
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 강의보는데 궁금해서요. Password 를 exclude로 하는 이유는 알겠는데 comments 하고 votes 프라퍼티 들을 exclude하는 이유는 뭘까요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
docker-compose up 명령어 날리면 에러 발생
에러 내용이 아래와 같은데 조취 방법좀 알려주세요 질문 두가지는 현재 docker 는 설치 되있긴 한데 docer-compose 는 설치 된건지 모르겠고 .env 유저 아이디와 비밀번호는 .env 에 임의로 설정하면 되나요? .env:DB_USER_ID=postgres DB_USER_PASSWORD=1234 docker-compose.yml:version: '3' services: db: image: postgres:latest container_name: postgres restart: always ports: - "5432:5432" environment: POSTGRES_USER: ${DB_USER_ID} POSTGRES_PASSWORD: ${DB_USER_PASSWORD} volumes: - ./data:/var/lib/postgresql/data 실행 test(base) sizl@sizlui-MacBookPro server % docker-compose up Traceback (most recent call last): File "urllib3/connectionpool.py", line 670, in urlopen File "urllib3/connectionpool.py", line 392, in _make_request File "http/client.py", line 1255, in request File "http/client.py", line 1301, in _send_request File "http/client.py", line 1250, in endheaders File "http/client.py", line 1010, in _send_output File "http/client.py", line 950, in send File "docker/transport/unixconn.py", line 43, in connect FileNotFoundError: [Errno 2] No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "requests/adapters.py", line 439, in send File "urllib3/connectionpool.py", line 726, in urlopen File "urllib3/util/retry.py", line 410, in increment File "urllib3/packages/six.py", line 734, in reraise File "urllib3/connectionpool.py", line 670, in urlopen File "urllib3/connectionpool.py", line 392, in _make_request File "http/client.py", line 1255, in request File "http/client.py", line 1301, in _send_request File "http/client.py", line 1250, in endheaders File "http/client.py", line 1010, in _send_output File "http/client.py", line 950, in send File "docker/transport/unixconn.py", line 43, in connect urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "docker/api/client.py", line 214, in _retrieve_server_version File "docker/api/daemon.py", line 181, in version File "docker/utils/decorators.py", line 46, in inner File "docker/api/client.py", line 237, in _get File "requests/sessions.py", line 543, in get File "requests/sessions.py", line 530, in request File "requests/sessions.py", line 643, in send File "requests/adapters.py", line 498, in send requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "docker-compose", line 3, in <module> File "compose/cli/main.py", line 81, in main File "compose/cli/main.py", line 200, in perform_command File "compose/cli/command.py", line 60, in project_from_options File "compose/cli/command.py", line 152, in get_project File "compose/cli/docker_client.py", line 41, in get_client File "compose/cli/docker_client.py", line 170, in docker_client File "docker/api/client.py", line 197, in __init__ File "docker/api/client.py", line 221, in _retrieve_server_version docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) [65638] Failed to execute script docker-compose
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
net::ERR_CONNECTION_REFUSED 에러
안녕하세요.cors 설정 후 회원가입 버튼을 클릭하면 아래와 같은 에러가 발생합니다.검색을 통해 해결하려고 시도하였으나 찾지 못하여 질문드립니다.
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
cookie-parser Invalid or unexpected token error
영상에 따라서 단순하게 cookie-parser 설치하고 import cookie-parser 한다음에 app.use(cookieParser()) 진행하면 상단에 이미지처럼 에러가 발생하더라구요. cookie-parser을 제거하면 cookie가 정상적으로 저장되는 것을 볼 수 있었습니다. 어떤 부분을 놓친 것일까요server.tsimport express from "express"; import morgan from "morgan"; import { AppDataSource } from "./data-source" import authRoutes from "./routes/auth"; import subRoutes from "./routes/subs"; import cors from 'cors'; import dotenv from 'dotenv'; import cookieParser from "cookie-parser"; const app = express(); dotenv.config(); app.use(cors({ origin: process.env.ORIGIN, credentials: true })) app.use(express.json()); app.use(morgan('dev')); app.use(cookieParser()) app.get("/", (_, res) => res.send("running")); app.use('/api/auth', authRoutes); app.use("/api/subs", subRoutes); const PORT = process.env.PORT; console.log('PORT', PORT) app.listen(PORT, async () => { console.log(`server running at http://localhost:${PORT}`); AppDataSource.initialize().then(async () => { console.log("data initialize...") }).catch(error => console.log(error)) })
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
ec2 npm install sharp error
ec2 ssh 접속하여 npm install을 하였는데 sharp 모듈이 설치가 안 되는 것 같습니다. node version도 요구 사항을 충족해주었는데 무엇이 문제인지 해결하지 못하고 있습니다.
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
tailwindcss 실행 안됨
영상에 따라 tailwindcss 설치를 하고 기본적으로 index.tsx로 실행을 했을 때는 정상적으로 적용된 것을 확인 후 영상에 따라 실행을 했는데 register.tsx css가 적용이 되지 않더라구요 현재 에러가 발생했을 때 에러 인식을 해서 빨간색으로 구분되어야하는데 구분이 되지 않고 혹시나해서 소스코드에서 작성해주신대로 복붙해서 적용을 했는데도 안되더라구요 InputGroup.tsx 코드는 하단에 코드입니다. 확인 부탁드립니다. import React from 'react' import cls from "classnames"; interface InputGroupProps { className?: string; type?: string; placeholder?: string; value: string; error: string | undefined; setValue: (str: string) => void; } const InputGroup: React.FC<InputGroupProps> = ({ className = "mb-2", type = "text", placeholder = "", error, value, setValue }) => { return ( <div className={className}> <input type={type} style={{ minWidth: 300 }} className={cls(`w-full p-3 transition duration-200 border border-gray-400 rounded bg-gray-50 focus:bg-white hover:bg-white`, { "border-red-500": error } )} placeholder={placeholder} value={value} onChange={(e) => setValue(e.target.value)} /> <small className='font-medium text-red-500'>{error} </small> </div> ) } export default InputGroup
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
_middleware.js 질문이요.
_middleware.js 로 로그인이 안되었을 때, 제한을 하려면 어떻게 해야될까요? 12.2 버전부터는 _middleware.js를 쓰면 pages 라우팅 정보 뿐만 아니라 모든 라우팅이 미들웨어로 들어와서요.
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
docker-compose에 대한 질문입니다
volumes: -./data:/var/lib/postgresql/data 이러한 형식으로 volume의 위치를 지정했는데 왜 이 위치로 지정했는지 알 수 있을 까요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
Cannot find name 'Length'. Did you mean 'length' 에러 발생
영상 나오는대로 @Length 진행을 하는데 제목 내용처럼 Cannot find name 'Length'. Did you mean 'length' 에러 발생합니다. 어떻게 해결하면 될까요?
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
ec2 배포시 cors 문제
안녕하세요, 수강생 신재우입니다. 강의는 현재 모두 완료하였으나 몇가지 궁금한점이 있어서 문의드립니다.ec2 cors 문제로컬에서 진행할 때에는 cors 문제가 발생하지 않았으나 aws ec2에 배포한 후에 cors 문제가 발생합니다. 이를 어떻게 해결해야 할지 모르겠습니다.client/Dockerfile, server/Dockerfile, docker-compose.yml 파일 질문도표자료에 제공된 해당 파일들의 코드와 첨부된 소스코드의 파일 내용이 서로 다른데 어떤 것을 따라 하는 것이 옳은 것인가요? 저는 도표자료를 바탕으로 진행하였으나 이 과정에서 몇가지 문제가 있는 것 같습니다. client/Dockerfile에서 RUN npm run build:prod 와 CMD ["npm", "run", "start:prod"] 로 수정해 주어야 하는 것이 맞을까요?프리티어로 ec2 t2.micro 를 사용하고 있습니다. ec2 운영과정에서 ec2에 접속이 갑자기 느려지고 다시 접속하는 것이 불가능해지는 현상이 빈번하게 발생하고 있습니다. 이를 해결하기 위해서는 어떻게 해야하는 걸까요?좋은 강의 제공해주셔서 감사합니다.
- 미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
ec2 배포시 500 에러가 해결되지 않습니다
강의 자료를 통해 docker-compose.yml 파일을 수정하고 server/Dockerfile과 client/Dockerfile을 다음과 같이 추가해줬습니다. 이후에 로컬에서 docker-compose up을 실행하게 되면다음과 같은 에러가 발생합니다. docker-compose.yml과 server/Dockerfile, client/Dockerfile을 추가하기 이전까지는 로컬에서는 실행하는 데에 있어서 전혀 문제가 없었습니다.ec2 상에서 sudo docker-compose up 을 실행하면 다음과 같은 에러가 발생합니다.그리고 docker-compose.yml과 server/Dockerfile, client/Dockerfile을 추가하여 ec2 상에서 실행했을 때에 계속적으로 500에러가 발생합니다. 어느 부분이 문제이고 어떻게 수정해야 할지 감이 잘 오지 않아서 질문드립니다.