묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
entity 구현 1:1 강의 질문입니다.
안녕하세요. 좋은 강의 감사합니다.entity 구현 1:1 강의에서 npm i 후 package: '@angular-devkit/core@15.1.4', Unsupported engine 이라고 나오는데, 이렇게 터미널에 찍히는 이유가 무엇인가요?계속 사용할 경우 어떤 문제가 발생하나요? npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/core@15.1.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/schematics@15.1.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/schematics-cli@15.1.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/core@15.0.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/schematics@15.0.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN deprecated apollo-datasource@3.3.2: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-errors@3.3.1: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-plugin-base@3.7.1: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-types@3.7.1: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead npm WARN deprecated apollo-server-express@3.11.1: The `apollo-server-express` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-reporting-protobuf@3.3.3: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-env@4.2.1: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md npm WARN deprecated apollo-server-core@3.11.1: The `apollo-server-core` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. added 806 packages, and audited 807 packages in 21s 98 packages are looking for funding run `npm fund` for details found 0 vulnerabilities
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
Error: Access denied for user 'root'@'localhost' (using password: YES) 에러
아래 질문과 동일한 에러가 발생해서 알려주신 해결책으로 진행했는데...이번에는 다른 문제가 발생했습니다.Error: Access denied for user 'root'@'localhost' (using password: YES)구글링으로 아무리 찾아서 해보아도 해결이 안되고 있습니다.아래 테이블 만들었구요권한문제인가 싶어서 user 테이블의 root 의 authentication_string 을 바꿔도 해쉬값으로 저장되지도 않고...현재는 NULL로 해놓고 있는데 도무지 해결이 되지 않습니다. 도와주세요 ㅠㅠ
-
미해결Slack 클론 코딩[백엔드 with NestJS + TypeORM]
seeder is not a constructor
yarn seed를 통해 더미데이터를 생성하려 했으나 "seeder is not a constructor" 라는 에러에 마주칩니다. 어느 부분이 잘못됫는지 알아보기 위해 에러코드를 살펴봤으나 제 코드 부분이 아닌 typeorm-extension 부분에서 에러가 나는것 같아 해결하기 어렵습니다.TypeError: seeder is not a constructor at /Users/jinyoung/Desktop/try-own-version/practice-version/node_modules/typeorm-extension/src/seeder/module.ts:122:19 at Generator.next (<anonymous>) at fulfilled (/Users/jinyoung/Desktop/try-own-version/practice-version/node_modules/typeorm-extension/dist/seeder/module.js:5:58) dataSource.ts import dotenv from 'dotenv'; //dataSource에 entity를 입력해줄때는 절대경로면 못찾아온다. 그래서 상대 경로로 써줘야함 import { User } from './src/users/entities/user.entity'; import { DataSource } from 'typeorm'; const mode = process.env.NODE_ENV || 'development'; dotenv.config({ path: process.cwd() + `/.env.${mode}` }); const dataSource = new DataSource({ type: 'mysql', host: 'localhost', port: 3306, database: process.env.DB_DATABASE, username: process.env.DB_USERNAME, password: process.env.DB_PASSWORD, charset: 'utf8mb4_general_ci', entities: [User], migrations: [__dirname + '/src/migrations/*.ts'], synchronize: true, logging: true, }); export default dataSource; package.json seed부분 설정 "seed": "ts-node ./node_modules/typeorm-extension/dist/cli/index.js seed -d ./dataSource.ts" database/seeds/create-initial-data.ts import { User } from '../../users/entities/user.entity'; import { DataSource } from 'typeorm'; import { Seeder, SeederFactoryManager } from 'typeorm-extension'; export class UserSeeder implements Seeder { async run( dataSource: DataSource, factoryManager: SeederFactoryManager, ): Promise<any> { const userRepository = dataSource.getRepository(User); await userRepository.save({ email: 'ggg@gmail.com', firstName: 'sfvs', lastName: 'wdwdwd', nickname: 'hihi', }); } } typeorm-extension 버젼 "typeorm-extension": "^2.4.2", "typeorm": "^0.3.12", 시도해본 내용1. dataSource 생성시 new DataSource({... 중략seed:["create-initial-data.ts 경로"] 추가})2. db 삭제후 다시 생성(생성시 테이블 싱크까지 맞춘후 seed 시도)3. typeorm-extension 버전 문제일까 해서 다운그레이드 시도4. typeorm 0.3대는 유지하고 0.3.11, 0.3.10등 다른 버전으로 시도결과 모두 실패
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
save 파라미터에 스프레드 안쓰고 객체를 넘겨도 되나요?
const savedProductSaleslocation = await this.productSaleslocationRepository.save({ ...productSaleslocation, });위 코드에서, 아래처럼 코드를 바꿔봤습니다. const savedProductSaleslocation = await this.productSaleslocationRepository.save(productSaleslocation);정상 작동했는데 차이가 무엇인가요? 또 권장하는 방식은 무엇인가요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
우분투에 몽고디비 설치 후 실행이 안됩니다.
제가 사용중인 우분투 버젼입니다.몽고 디비 설치를 노션 자료에 있는대로도 설치를 해보고, 삭제하고 공식문서에 있는대로도 설치를 해봤는데(노션에는 공개키가 server-5.0 으로 되어있고 공식 문서는 server-6.0 으로 되어있더라구요)설치 후에 실행을 해보면 [fail] 이 뜨면서 실행이 되지 않네요.구글링해서 여러가지 방법 따라해봐도 계속 fail 이어서 질문글 올립니다.추가로 이상한 점은 mongod --version 이라고 치면버전이 나오는게 아니라 Illegal instruction 라고 나옵니다.++구글에 mongod --version Illegal instruction 라는 키워드로 검색을 해서 https://info-orgs.blogspot.com/2021/10/how-to-install-mongodb-v44-mongodb.html이 글을 보고 몽고 디비 4.4 버전을 설치해봤는데mongod --version 이라고 치면 이제 버전이 나오긴 하는데 여전히 실행은 실패하네요.$ service mongod start * Starting database mongod /etc/init.d/mongod: 136: ulimit: error setting limit (Operation not permitted) /etc/init.d/mongod: 142: ulimit: error setting limit (Operation not permitted) start-stop-daemon: start-stop-daemon: unable to open pidfile '/var/run/mongod.pid' for writingunable to set gid to 121 (Permission denied) (Operation not permitted) start-stop-daemon: child returned error exit status 2
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
Saga vs Thunk
Redux Toolkit을 써보고 싶은데 고민이 생겼습니다.제로초 님이 실무에서 리덕스 할 떄 Saga를 더 잘 쓰셨다고 말씀하셨던 거 같습니다. 근데 Redux Toolkit을 쓰려면 Thunk를 쓰는 게 더 편할 거 같은데 어떻게 생각하시나요?? 그리고 이미 Saga를 열심히 배워놨고 익숙해 졌는데 Toolkit를 쓰려고 Thunk로 다시 돌아가야 된다는 게 조금 배웠던 시간이 아깝기도 하고 고민중입니다. 물론 둘 다 동일한 비동기 요청을 하는 기능을 하는 것이지만 배우고 있는 입장에서는 고민이네요.제로초 님은 Redux Toolkit 쓸 때에도 Saga를 같이 쓰시는 편인가요?+인피니트 스크롤링을 구현할때의 경우도 생각을 해봐야 될 거 같은데, 이부분은 강의를 끝까지 안 들어봐서 어떤 결정이 나을지 모르겠네요
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
리듀서 action 과 draft 차이
리듀서에서 draft사용은 기본 state 이고 action은 dispatch에 받아온 값인거죠?
-
해결됨탄탄한 백엔드 NestJS, 기초부터 심화까지
[SOLVE] 고양이 프로젝트 로그인 API 프론트엔드 연결 문제
네트워크 소스 확인해보니, 같은 강의에서 수행된 Swagger에서 사용한 Header(Authorization)이 살아있고 이를 이용해 로그인 시도하는 것을 확인했습니다.swagger 로그인을 수행하신 분들은 기존 쿠키 삭제하고 다시 시도하시면 정상 로그인 됩니다.안녕하세요 고양이 프로젝트 로그인 API 연결이 잘 안되어 질문드립니다.포스트맨에서는 로그인이 정상적으로 수행됩니다.그런데 프론트에서 로그인을 수행하면 다음과 같이 Unauthorized 에러가 발생합니다.비밀번호를 다르게 입력해보니 이메일과 비밀번호를 확인하라는 에러가 뜨는걸로 봐서 뭔가 다른 문제가 있는것 같습니다. 아마 프론트 문제인것같은데 어떻게 해결해야할지 모르겠습니다...도움주시면 감사하겠습니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
dotenv 관련 질문
수업 내용 보면 dotenv import를email.js 와 phone.js 두군데서 해주는데index.js 한군데서만 해주면 안되나요? 그렇게 해도 작동을 하더라구요.그리고 수업에선 import 'dotenv/config'이렇게 import 해주고 있는데지금 npm 사이트 보면이렇게 나와있더라구요. import 사용법이 바뀐걸까요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
현재 nodemon 커널 실행 nodemon yarn aaa 부분 수강중 입니다.
윈도우 환경에서 yarn 이 에러가 나서 npm으로 진행중입니다~"npm yarn 은 성능만 차이가 나고 명령어는 똑같다" 라고 알고 있는데,명령어도 다른건가 라는 의문이 들어 질문 드립니다. npm의 경우는pakage.js 에 아래와 같이 작성 후npm aaa 로는 실행이 안되고,npm run aaa 로 만 실행이 되는데,yarn aaa 는 실행이 잘 되는듯 하네요왜 그런 걸까요? run 이 생략된 걸까요?웹펙 쪽을 먼저 학습하고 가야 할지...수업 들으면서 모르는걸 다 질문드려도 될까요?package.jsonscript:{"aaa":"nodemon app.js"}
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
퍼사드 패턴 코드 공유 드립니다!
퍼사드 패턴 관련하여 노션 코드는 강의 코드와 다르기때문에, 에러를 해결하지 못하신 분들을 위해서 코드 공유 드립니다.(에러메세지로 위치, 그 위치에 해당하는 강사님이 강의 진행시 적어주셨던 코드와 대조하여서 작성하였습니다)// index.js import { checkValidationPhone, getToken, sendTokenToSMS} from './phone.js' // requestAnimationFrame('./phone.js') console.log('안녕하세요~~'); function createTokenOfPhone(myphone) { // 1. 휴대폰번호 자릿수 맞는지 확인하기 const isValid = checkValidationPhone(myphone); if (isValid) { // 2. 핸드폰 토큰 6자리 만들기 const mytoken = getToken(); // 3. 핸드폰번호에 토큰 전송하기 sendTokenToSMS(myphone, mytoken); } } createTokenOfPhone('01012345678', 6);// phone.js export function checkValidationPhone(myphone) { if (myphone.length !== 10 && myphone.length !== 11) { console.log('에러 발생!!! 핸드폰 번호를 제대로 입력해 주세요!!!'); return false; } else { return true; } } export function getToken(count) { const mycount = 6 if (count === undefined|null) { console.log('에러 발생!!! 갯수를 제대로 입력해 주세요!!!'); return; } else if (mycount <= 0) { console.log('에러 발생!!! 갯수가 너무 적습니다!!!'); return; } else if (mycount > 10) { console.log('에러 발생!!! 갯수가 너무 많습니다!!!'); return; } const result = String(Math.floor(Math.random() * 10 ** count)).padStart(mycount,'0'); return result; // console.log(result) } export function sendTokenToSMS(fff, ggg) { console.log(fff + '번호로 인증번호' + ggg + '를 전송합니다!!'); }
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
다이나믹 라우터 7버젼 이상 질문
다이나믹 라우팅을 할때 next-redux-wrapper 7버전 이상 사용하고 있는데질문이 2가지가 있습니다!구동방식에 대해서는 이해했는데 getServerSideProps 에 loadPost에 context.params.id 가 아니라 7버전 이상이여서 req.params.id로 넣어줬는데 백엔드에서 받는 postId가 undefined로 뜹니다 혹시 7버전이상일땐 loadPost에는 어떤 값을 넣어줘야하나요..!? 게시글에 <Link>를 사용해서 다이나믹 라우터를 이용하면 처음에 CSR 방식으로 값을 받아와서 데이터가 없기 때문에 undefined가 뜨기 때문에 그 동안 로딩창을 띄워줘야 된다고 말씀하셨는데 그 말씀 자체에는 이해가 됐는데 그러면 getServerSideProps 에 따로 작업을 해줘야하는건가요!?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
yarn init 에러 문의
안녕하세요 선생님퍼샤드 패턴에서 58분쯤 보면yarn init이라고 입력을 하시던데저의 경우에는 에러가 뜹니다.ERROR: init is not COMMAND nor fully qualified CLASSNAME. Usage: yarn [OPTIONS] SUBCOMMAND [SUBCOMMAND OPTIONS] or yarn [OPTIONS] CLASSNAME [CLASSNAME OPTIONS]왜 입력 값이 충족되지 않았다고 하는 걸까요?참고로 제 node.js 버전은 18대입니다. 혹시몰라 전체적인 에러메세지 같이 첨부합니다!(base) ➜ 01-05-token-count-api-facade-import git:(master) ✗ yarn init ERROR: init is not COMMAND nor fully qualified CLASSNAME. Usage: yarn [OPTIONS] SUBCOMMAND [SUBCOMMAND OPTIONS] or yarn [OPTIONS] CLASSNAME [CLASSNAME OPTIONS] where CLASSNAME is a user-provided Java class OPTIONS is none or any of: --buildpaths attempt to add class files from build tree --config dir Hadoop config directory --daemon (start|status|stop) operate on a daemon --debug turn on shell script debug mode --help usage information --hostnames list[,of,host,names] hosts to use in worker mode --hosts filename list of hosts to use in worker mode --loglevel level set the log4j level for this command --workers turn on worker mode SUBCOMMAND is one of: Admin Commands: daemonlog get/set the log level for each daemon node prints node report(s) rmadmin admin tools scmadmin SharedCacheManager admin tools Client Commands: applicationattempt prints applicationattempt(s) report app|application prints application(s) report/kill application/manage long running application classpath prints the class path needed to get the hadoop jar and the required libraries cluster prints cluster information container prints container(s) report envvars display computed Hadoop environment variables fs2cs converts Fair Scheduler configuration to Capacity Scheduler (EXPERIMENTAL) jar <jar> run a jar file logs dump container logs nodeattributes node attributes cli client queue prints queue information schedulerconf Updates scheduler configuration timelinereader run the timeline reader server top view cluster information version print the version Daemon Commands: nodemanager run a nodemanager on each worker proxyserver run the web app proxy server registrydns run the registry DNS server resourcemanager run the ResourceManager router run the Router daemon sharedcachemanager run the SharedCacheManager daemon timelineserver run the timeline server SUBCOMMAND may print help when invoked w/o parameters or with -h.구글링은 해봐도 못찾겠고,그나마 힌트가 될만한건 이전에 hadoop 설치하면서 yarn이 같이 깔렸던 것 같은데, 그것과 충돌이 되서 그럴 수 있다는 정보까진 찾았습니다! brew uninstall hadoop 으로 하둡을 날려버렸더니 yarn 명령이 아예 작동이 안되는 것으로 봐서는 맞는 것 같습니다.brew install yarn으로 설치 다시 해줬더니 작동은 잘 됩니다!선생님 이럴경우에 삭제 말고 따로 하둡과 충돌할 경우에 hadoop의 yarn과 node.js의 yarn을 별도로 관리하는 방법은 없을까요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
PostImages 이미지 length 오류
PostImages.jsimport React, { useCallback, useState } from 'react'; import PropTypes from 'prop-types'; import { PlusOutlined } from '@ant-design/icons'; import ImagesZoom from './ImagesZoom'; const PostImages = ({ images }) => { const [showImagesZoom, setShowImagesZoom] = useState(false); const onZoom = useCallback(() => { setShowImagesZoom(true); }, []); const onClose = useCallback(() => { setShowImagesZoom(false); }, []); if (images.length === 1) { return ( <> <img role="presentation" src={images[0].src} alt={images[0].src} onClick={onZoom} /> {showImagesZoom && <ImagesZoom images={images} onClose={onClose} />} </> ); } if (images.length === 2) { return ( <> <div> <img role="presentation" src={images[0].src} alt={images[0].src} width="50%" onClick={onZoom} /> <img role="presentation" src={images[1].src} alt={images[1].src} width="50%" onClick={onZoom} /> </div> {showImagesZoom && <ImagesZoom images={images} onClose={onClose} />} </> ); } return ( <> <div> <img role="presentation" src={images[0].src} alt={images[0].src} width="50%" onClick={onZoom} /> <div role="presentation" style={{ display: 'inline-block', width: '50%', textAlign: 'center', verticalAlign: 'middle' }} onClick={onZoom} > <PlusOutlined /> <br /> {images.length - 1} 개의 사진 더보기 </div> </div> {showImagesZoom && <ImagesZoom images={images} onClose={onClose} />} </> ); }; PostImages.propTypes = { images: PropTypes.arrayOf(PropTypes.shape({ src: PropTypes.string, })).isRequired, }; export default PostImages;Post.jsexport const initialState = { mainPosts: [{ id: 1, User: { id: 1, nickname: '제로초', }, content: '첫 번째 게시글', Images: [{ src: 'https://bookthumb-phinf.pstatic.net/cover/137/995/13799585.jpg?udate=20180726', }, { src: 'https://gimg.gilbut.co.kr/book/BN001958/rn_view_BN001958.jpg', }, { src: 'https://gimg.gilbut.co.kr/book/BN001998/rn_view_BN001998.jpg', }], Comments: [{ User: { nickname: 'nero', }, content: '우와 개정판이 나왔군요~', }, { User: { nickname: 'hero', }, content: '얼른 사고싶어요~', }] }], imagePaths: [], postAdded: false, }; const ADD_POST = 'ADD_POST'; export const addPost = { type: ADD_POST, }; const dummyPost = { id: 2, content: '더미데이터입니다.', User: { id: 1, nickname: '제로초', }, Images: [], Comments: [], }; export default (state = initialState, action) => { switch (action.type) { case ADD_POST: { return { ...state, mainPosts: [dummyPost, ...state.mainPosts], postAdded: true, }; } default: { return { ...state, }; } } };코드에 문제가 없는 것 같은데 위와 같이 에러가 뜹니다.post.js파일도 비교해보면서 찾아봤는데도.. 답이 안보입니다.ㅠㅠ
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
state 중에 me: null
강의 진도 : 액션과 상태 정리하기state(=initialState) 중에 me: null 을 저희가 왜 만들어줬었죠?? 길을 잃었습니다. me가 무슨 정보는 담고 있는 걸까요..??
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
[SOLVED] NestJS 프로젝트 생성 실패
KT망을 사용 중일 경우 ts-jest가 설치되지 않는 문제가 있습니다.해당 문제는 npm의 registry를 미러 서버로 설정한 뒤 nest new~를 통해 프로젝트를 생성하고, 다시 원 서버로 복구하시면 됩니다.npm config set registry https://registry.npmjs.cf/ nest new project npm config set registry https://registry.npmjs.org/ 안녕하세요 4번째 섹션의 첫 강의 NestJS 개발 환경 셋팅을 보고 NestJS를 통한 Project를 생성하려 합니다.사용중인 컴퓨터 환경은 다음과 같습니다.Apple Silicon M1 Max MacOS Ventura 13.2 Node: 16.16.0 Npm: 8.11.0그런데 nest 문서에 나와있는 방법대로 프로젝트를 생성하면 에러가 발생합니다.> nest new project ⚡ We will scaffold your app in a few seconds.. ? Which package manager would you ❤️ to use? npm CREATE project/.eslintrc.js (663 bytes) CREATE project/.prettierrc (51 bytes) CREATE project/README.md (3340 bytes) CREATE project/nest-cli.json (171 bytes) CREATE project/package.json (1938 bytes) CREATE project/tsconfig.build.json (97 bytes) CREATE project/tsconfig.json (546 bytes) CREATE project/src/app.controller.spec.ts (617 bytes) CREATE project/src/app.controller.ts (274 bytes) CREATE project/src/app.module.ts (249 bytes) CREATE project/src/app.service.ts (142 bytes) CREATE project/src/main.ts (208 bytes) CREATE project/test/app.e2e-spec.ts (630 bytes) CREATE project/test/jest-e2e.json (183 bytes) ▹▹▹▹▸ Installation in progress... ☕ Failed to execute command: npm install --silent ✖ Installation in progress... ☕ 🙀 Packages installation failed! In case you don't see any errors above, consider manually running the failed command npm install to see more details on why it errored out. Thanks for installing Nest 🙏 Please consider donating to our open collective to help us maintain this package. 🍷 Donate: https://opencollective.com/nest 그래서 생성된 project 폴더로 이동하여 npm install --verbose를 통해 어디서 실패하는지 확인해 보았더니 다음과 같은 내용을 얻을 수 있었습니다. 로그가 너무 길어서, Error 부분만 넣겠습니다.npm timing idealTree:node_modules/windows-release/node_modules/execa Completed in 32ms npm http fetch GET 200 https://registry.npmjs.org/end-of-stream 28ms (cache revalidated) npm timing idealTree:node_modules/windows-release/node_modules/get-stream Completed in 28ms npm timing idealTree:node_modules/pump Completed in 1ms npm timing idealTree:node_modules/end-of-stream Completed in 0ms npm timing idealTree:node_modules/windows-release/node_modules/human-signals Completed in 0ms npm timing idealTree:node_modules/send/node_modules/debug/node_modules/ms Completed in 0ms npm timing idealTree:buildDeps Completed in 314816ms npm timing idealTree:fixDepFlags Completed in 3ms npm timing idealTree Completed in 314826ms npm timing command:install Completed in 314831ms npm verb type system npm verb stack FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/ts-jest: aborted npm verb stack at ~/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/body.js:168:15 npm verb stack at runMicrotasks (<anonymous>) npm verb stack at processTicksAndRejections (node:internal/process/task_queues:96:5) npm verb stack at async RegistryFetcher.packument (~/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/pacote/lib/registry.js:99:25) npm verb stack at async RegistryFetcher.manifest (~/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/pacote/lib/registry.js:124:23) npm verb stack at async Arborist.[nodeFromEdge] (~/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1108:19) npm verb stack at async Arborist.[buildDepStep] (~/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:976:11) npm verb stack at async Arborist.buildIdealTree (~/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:218:7) npm verb stack at async Promise.all (index 1) npm verb stack at async Arborist.reify (~/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:153:5) npm verb cwd ~/Playground/nodejs/inflearn/nestjs/section4/project npm verb Darwin 22.3.0 npm verb node v16.16.0 npm verb npm v8.11.0 npm ERR! code ECONNRESET npm ERR! errno ECONNRESET npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/ts-jest: aborted npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm verb exit 1 npm timing npm Completed in 314906ms npm verb unfinished npm timer reify 1676004665919 npm verb unfinished npm timer reify:loadTrees 1676004665923 npm verb code 1 npm ERR! A complete log of this run can be found in: npm ERR! ~/.npm/_logs/2023-02-10T04_51_05_846Z-debug-0.logNestJS에서 supertest 설치를 위해 jest 패키지를 설치하는 것 같은데, jest 패키지들이 정상적으로 (로그에 의하면 ts-jest) 설치되지 않습니다.같은 에러를 겪은적 있으시거나, 해결법 아시는 분 도움 부탁드립니다.감사합니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
status 코드
tokens/phone API를 보면res.send("인증완료") 만 보내줬는데도 200이 같이 전송 되는데 status 코드는 백엔드 측에서res.status(200)이런식으로 따로 입력해주지 않아도정상적으로 api 호출이 됐을 경우에는 200이 자동으로 전송되는건가요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
곧 mySQL 들어가기전에 질문입니다.
서버쪽도 타입스크립트 써도 되나요?? 프론트쪽 타입스크립트로 하고있어가지고요
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
console.log 실행불가
package.json 파일까지 추가해서 해봤는데도 실행이 안되네요 해결방법 알고싶습니다
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
해당 오류 ERROR in ./src/index.js 5:0-40 를 아실까요 ..?
제가 axios 설치 이후 npm start에서 지속적으로 오류가 나길래 stackflow를 보고 -i npm ~... 무엇을 터미널에서 진행시키고.node_modules 폴더와 package.json & lock.json 파일 삭제후 npm start 다시 했는데 아래와 같이모듈 오류가 지속적으로 뜨네요.모듈 파일명들이 전에는 @로 시작하는 파일들이 다 날라간 것 같구요.모듈 중 Axios 폴더에서 index.d.ts 파일에서 오류가 발견되고 있는 상황입니다.그랩님 조금만 도와주실 수 있을까요