안녕하세요 선생님 퍼샤드 패턴에서 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을 별도로 관리하는 방법은 없을까요?
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.log NestJS에서 supertest 설치를 위해 jest 패키지를 설치하는 것 같은데, jest 패키지들이 정상적으로 (로그에 의하면 ts-jest) 설치되지 않습니다. 같은 에러를 겪은적 있으시거나, 해결법 아시는 분 도움 부탁드립니다. 감사합니다.
안녕하세요. 그림부분에서 이해가 가지않아 질문 드립니다. a =[1,2,3] 으로 초기화를하면 array는 0,1,2 즉 배열 그림이 3칸([][][])만 있어야 하는게 아닌가요? 하지만 강의의 그림에서는 [1][2][3][][] 으로 0,1,2,3,4 까지 그려져 있습니다. (size가 3인데 말이죠) a.append(4) 를 했을때, 동적배열은 array로 구현이 돼어있기때문에 random access 가 가능하여 마지막 index를 찾을 수 있다고 하셨는데, 선언및 초기화 a = [1,2,3] // 그림 -> [1][2][3] 접근 a[0] // O(1) 수정 a[1] = 9 // 그림 [1],[9],[3] 추가 a.append(4) // 이때 Resizing 이 일어나 /* 그림 [1][9][3] // 값을 옮긴 후 삭제 [1][9][3][4][][] // 복잡도 O(n) */ 의 모양이 돼야하는게 아닌가요? 즉, 궁굼한 점은 선언 및 초기화 할때 배열의 size 는 3인데그림의 배열 size는 [][][][][] 5칸이냐는 것입니다.
DB에 Insert 하려고 할 때 TypeOrm에서 Default 값을 넣어주지 않아 에러가 발생했습니다. (CreatedAt, UpdatedAt 컬럼) 그래서 처음에는 Database에서 Table에 Default값을 세팅하고 사용했는데요. 어떤 분이 질문 하신걸 보고 다시 수정해 보는 중입니다. 강의에 있는 소스는 @Column("datetime", { name: "createdAt", default: () => "CURRENT_TIMESTAMP"}) ... 이렇게 적혀있더군요. 근데 Github의 소스에는 @CreateDateColumn() createdAt: Data; 로만 적혀있었습니다. 그리고 @CreatedDateColumn()은 Special Column이라고 아래와 같이 설명이 있던데요. @CreateDateColumn is a special column that is automatically set to the entity's insertion date. You don't need to set this column - it will be automatically set. 저는 이 얘기를 TypeOrm에서 자동으로 입력해 주는 값으로 이해했는데... 막상 해보면 안되더라고요. 그래서... 만약 Github의 소스와 같이 @CreateDateColumn... 으로 사용하려면 Database에서 Default값을 설정해주어야 하는지 (그렇다면 @CreateDateColumn..은 자동 세팅되는 것이 아니겠죠...) 아니면 영상 강의 상처럼... default() => "CURRENT_TIMESTAMPT"... 로 사용해야 할지요 (물론 영상 강의의 소스는 Database에 그렇게 설정되어 있으니 그렇게 나온것이겠지만요..)
현재 강의에 목업으로 된 테스트 코드가 작성되어져 있는걸 봤는데요 실제 DB에다가 테스트를 하려고 이것저것 해봤는데 잘 안되더라구요;; error: Nest can't resolve dependencies of the ~~ 하면서 에러가 나오고 아마 서비스 쪽에 주입된 레파지토리 때문일 것 같은데 목업이 아닌 실제 db에 테스트코드를 돌리기 위해서는 어떤 작업이 필요한 지 질문드립니다.
우선 잘 되는것이 갑자기 안되는데 해결이 안되서 질문을 올립니다. 우선 제가 한 작업은 다음과 같습니다. 7강의 typeorm 커넥션 맺기까지 완료 한 후 nest g res {service name}을 실행하여 테스트 했습니다 폴더가 생기면서 service, module, controller가 생기는것을 확인 한 후 삭제했습니다. 이후 yarn start:dev를 실행하면 아래와 같이 에러가 났습니다. yarn run v1.22.19 warning ..\package.json: No license field $ nest build --webpack --webpackPath webpack-hmr.config.js --watch Info Webpack is building your sources... ERROR in ./src/main.ts:1:29 TS2307: Cannot find module '@nestjs/core' or its corresponding type declarations. > 1 | import { NestFactory } from '@nestjs/core'; | ^^^^^^^^^^^^^^ 2 | import { DocumentBuilder } from '@nestjs/swagger'; 3 | import { SwaggerModule } from '@nestjs/swagger/dist'; 4 | import { AppModule } from './app.module'; webpack 5.75.0 compiled with 1 error in 3426 ms E:\web-message\dist\main.js:1834 /******/ throw e; ^ Error: Cannot find module '@nestjs/core' Require stack: - E:\web-message\dist\main.js at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15) at Module._load (node:internal/modules/cjs/loader:885:27) at Module.require (node:internal/modules/cjs/loader:1105:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.<anonymous> (E:\web-message\dist\main.js:196:18) at __webpack_require__ (E:\web-message\dist\main.js:1831:33) at fn (E:\web-message\dist\main.js:1938:21) at Object.<anonymous> (E:\web-message\dist\main.js:166:16) at __webpack_require__ (E:\web-message\dist\main.js:1831:33) at E:\web-message\dist\main.js:2757:37 { code: 'MODULE_NOT_FOUND', requireStack: [ 'E:\\web-message\\dist\\main.js' ] } Node.js v18.13.0 우선 warning ..\package.json: No license field 이 부분을 해결하기 위해 찾아보니.. package.json의 private: true를 설정해 주라고 했지만, 이미 되어 있기 때문에 해결을 못했습니다. 그 다음 ERROR in ./src/main.ts:1:29 TS2307: Cannot find module '@nestjs/core' or its corresponding type declarations. > 1 | import { NestFactory } from '@nestjs/core'; 이 부분을 해결해 보기 위해 다음과 같은 작업을 했습니다. @nestjs/core의 삭제 및 재설치 node_modules 폴더 삭제 및 재설치 nestjs/core와 swagger의 충돌 문제가 있다는 얘기에 nestjs/core를 9.0.0으로 nestjs/common을 9.0.0으로, nestjs/platform-express를 9.0.0으로 수정하여 재설치 했으나 여전히 동일한 문제 발생 아래는 현재 저의 package.json입니다 { "name": "web-message", "version": "0.0.1", "private": true, "description": "", "author": "", "license": "UNLICENSED", "scripts": { "build": "nest build", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "nest start", "start:dev-backup": "nest start --watch", "start:dev": "nest build --webpack --webpackPath webpack-hmr.config.js --watch", "start:debug": "nest start --debug --watch", "start:prod": "node dist/main", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", "test": "jest", "test:watch": "jest --watch", "test:cov": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", "test:e2e": "jest --config ./test/jest-e2e.json" }, "dependencies": { "@nestjs/common": "^9.3.2", "@nestjs/config": "^2.3.0", "@nestjs/core": "^9.3.2", "@nestjs/platform-express": "^9.0.0", "@nestjs/swagger": "^6.1.4", "@nestjs/typeorm": "^9.0.1", "mariadb": "^3.0.2", "reflect-metadata": "^0.1.13", "rxjs": "^7.2.0", "swagger-ui-express": "^4.6.0", "typeorm": "^0.3.11", "typeorm-extension": "^2.4.2" }, "devDependencies": { "@nestjs/cli": "^9.0.0", "@nestjs/schematics": "^9.0.0", "@nestjs/testing": "^9.0.0", "@types/express": "^4.17.13", "@types/jest": "29.2.4", "@types/node": "18.11.18", "@types/supertest": "^2.0.11", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.0.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "jest": "29.3.1", "prettier": "^2.3.2", "run-script-webpack-plugin": "^0.1.1", "source-map-support": "^0.5.20", "supertest": "^6.1.3", "ts-jest": "29.0.3", "ts-loader": "^9.2.3", "ts-node": "^10.0.0", "tsconfig-paths": "4.1.1", "typeorm-model-generator": "^0.4.6", "typescript": "^4.7.4", "webpack": "^5.75.0", "webpack-cli": "^5.0.1", "webpack-node-externals": "^3.0.0", "webpack-pnp-externals": "^1.1.0" }, "jest": { "moduleFileExtensions": [ "js", "json", "ts" ], "rootDir": "src", "testRegex": ".*\\.spec\\.ts$", "transform": { "^.+\\.(t|j)s$": "ts-jest" }, "collectCoverageFrom": [ "**/*.(t|j)s" ], "coverageDirectory": "../coverage", "testEnvironment": "node" } } 뭔가... 업데이트를 하면서 문제가 생긴것 같아 찾던 중 nestjs@core와 swagger는 상호 작용하는 버전이 있다고 하던데 그것은 nest 9.X 미만에서 그런 것이고 github에 올려주신 package.json에도 9.X이상의 nestjs를 쓰신것으로 확인하여 swagger와의 충돌 문제는 아닌 것으로 생각했습니다. 어떻게 해결하면 좋을까요~? 참 참고로 nestjs : 9.1.8 yarn: 1.22.19 node: 18.13.0 을 사용하고 있습니다.
[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
- 본 강의 영상 학습 관련 문의에 대해 답변을 드립니다. (어떤 챕터 몇분 몇초를 꼭 기재부탁드립니다) - 이외의 문의등은 평생강의이므로 양해를 부탁드립니다 - 현업과 병행하는 관계로 주말/휴가 제외 최대한 3일내로 답변을 드리려 노력하고 있습니다 - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. <div class="layer_body" data-translation="true"> <p>금융당국이 급증하는 가계부채 증가세를 막기 위해 아파트 잔금대출에도 소득을 따져 대출한도를 정하는 총부채상환비율(DTI)을 적용하는 방안을 유력하게 검토하고 있다.</p> <p>지금은 집값을 기준으로 대출한도를 매기는 주택담보인정비율(LTV) 규제만 적용돼 소득이 없어도 집값의 70%를 빌려 잔금을 치르는 게 가능하다.</p> <p>앞으로 잔금대출에 DTI가 적용되면 소득이 없는 사람은 집값의 70% 대출 받는 게 어려워진다.</p> </div> 안녕하세요. 지금 강의 중인 내용에 보면 class의 div 값과 다르게 2개의 값이 연이어 나오는데요. 이런 경우에는 어떻게 입력하면 될까요? 복사해서 넣어보고 했는데 계속 오류가 뜹니다. import requests from bs4 import BeautifulSoup res = requests.get(' https://v.daum.net/v/20170615203441266 ') soup = BeautifulSoup(res.content,'html.parser') mydata = soup.find_all('div','layer_body' data-translation='true') mydata.get_text() 이런식으로 연달아서 넣으면 되는건지... 답변 부탁드려요^^
안녕하세요 강의 잘 듣고 있습니다! 분류결정 임곗값에 대해서 강의를 들을땐 잘 이해가 됐었는데 복습하면서 정리하다보니 제가 잘 이해가 안되는 부분이 있어 질문드립니다. 예를 들어, 분류 결정 임곗값이 0.3까지 낮아졌다고 할 때 pred_proba array에서 [0.49, 0.51] 이런 식으로 나온 경우 결국 0이나, 1이나 둘 다 임곗값은 넘었는데 어떤 걸로 예측하나요? 임곗값을 0.5로 설정했을땐 이럴 일이 없겠지만 임곗값을 낮췄을 때 어떻게 분류가 되는지 궁금합니다. 확률 간의 비교를 해서 더 높은 확률로 분류를 하는지 아니면 단순히 둘 다 넘었을 땐 positive로 분류하는 건지 알고싶습니다! 감사합니다.