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
윈도우 환경에서 yarn 이 에러가 나서 npm으로 진행중입니다~ "npm yarn 은 성능만 차이가 나고 명령어는 똑같다" 라고 알고 있는데, 명령어도 다른건가 라는 의문이 들어 질문 드립니다. npm의 경우는 pakage.js 에 아래와 같이 작성 후 npm aaa 로는 실행이 안되고, npm run aaa 로 만 실행이 되는데, yarn aaa 는 실행이 잘 되는듯 하네요 왜 그런 걸까요? run 이 생략된 걸까요? 웹펙 쪽을 먼저 학습하고 가야 할지... 수업 들으면서 모르는걸 다 질문드려도 될까요? package.json script:{ "aaa":"nodemon app.js" }
안녕하세요 선생님 퍼샤드 패턴에서 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을 별도로 관리하는 방법은 없을까요?
안녕하세요. 블로그앱 만드는 강의를 듣지 않았어서, 기존에 만들어진 블로그앱을 강의자료를 통해 다운로드 받았습니다. 맥과 윈도우 환경차이일지 모르겠는데, 섹션1-2 router/viewset 코딩하기의 예시를 복붙하여 실행시키는 코드가 ModuleNotFoundError: No module named 'rest_framework django' 아래와 같은 오류를 내며 실행되지 않습니다. 똑같이 urls.py를 다 주석처리 해주었으며, settings.py 설정도 완료된 상태입니다. 분명 모듈 네임이 rest_fraamework 인데 어디서 django가 붙는지 모르겠네요 ;; 해당 코드를 새로 제가 프로젝트를 하나 생성하여 실행시켰을 땐 아주 잘 실행이 됩니다. 혹시 기존의 강의자료에서 VueDjAgency-ch0를 다운받아 실행시킨다고 했을 때, 혹시 추가적으로 수정하거나,봐줘야 할 부분이 있는걸까요? 감사합니다.
tokens/phone API를 보면 res.send("인증완료") 만 보내줬는데도 200이 같이 전송 되는데 status 코드는 백엔드 측에서 res.status(200) 이런식으로 따로 입력해주지 않아도 정상적으로 api 호출이 됐을 경우에는 200이 자동으로 전송되는건가요?
비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지
"PM2를 활용한 무중단 배포"까지 진행하고 인스턴스는 현재 실행 중입니다. 이 상태를 모르고 로컬에서 VSCode로 node index.js명령을 실행했습니다. 그 후에 인스턴스를 중지할려고 WinSCP를 접속할려고 하는데 연결이 계속 거부되고 있습니다.. 서브에 연결할 수 있는 다른 방법은 없을까요? 일시적인 현상인 줄 알고 몇 일 기다렸다가 다시 시도해도 연결이 안됩니다,,
[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
{"hey":"guy","anumber":243, "anobject":{"whoa":"nuts","anarray":[1,2,"thr<h1>ee"],"more":"stuff"}, "awesome":true,"bogus":false,"meaning":null,"japanese":"明日がある。","link":"http://jsonview.com","notLink":"http://jsonview.com is great"} json안에 json 으로 데이터를 보낼려면 어떻게 해야하나요?
[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>3.0.0</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>3.0.0</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>3.0.0</version> </dependency> pom.xml에 swagger관련 추가시 There are test failures. Please refer to C:\Users\Owner\Desktop\RESTJPA\restjpa\target\surefire-reports for the individual test results. Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. 이런 오류가 나고 또다른 dependency에 원래 코드로 작성하면 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>3.0.0</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>3.0.0</version> </dependency> http://localhost:8080/v2/api-docs로 접속하면 java.lang.TypeNotPresentException: Type javax.servlet.http.HttpServletRequest not present 오류가 뜹니다. 현재 버전 바뀌면서 javax ->jakarta로 변경된것 같은데 어떻게 해결하나요?
구현은 끝나서 swagger 만들고 있는데, 계속 swagger가 보내는 json을 못찾는것같습니다. request의 body에도 아무 값이 안나오네요. 도와주세요ㅠㅠ API 코드 app.post("/users", async (req, res) => { const newUser = req.body.newUser; // 여기에서 오류가 납니다. if ((await isAuthPhone(newUser.phone)) === true) { if (checkValidationEmail(newUser.email) === true) { const og = await makeOG(newUser.prefer); console.log(og); const securePersonal = secure(newUser.personal); const user = new UserCollection({ name: newUser.name, email: newUser.email, personal: securePersonal, prefer: newUser.prefer, pwd: newUser.pwd, phone: newUser.phone, og: og, }); await user.save(); await sendWelcomeTemplateToEmail(newUser); console.log( `✅: "${user.name}" 사용자가 신규 가입에 성공했습니다.` ); res.send(user._id); } else { res.status(422).send("NotValidationEmail"); } } else { res.status(422).send("NotAuthPhone"); } }); Swagger 코드 (yaml 파일은 복붙하니까 이상하게 나와서 이미지로 첨부할게요) (+ 이미지에선 parameter의 name이 body로 되어있지만, 위 API 코드에 맞춰서 name을 newUser로 설정했었지만 같은 에러가 떴었습니다.) 에러 메시지 Swagger parameter 화면 아무리 찾아도 방법을 모르겠어서 올립니다ㅠㅠ.... 도와주세요.....