묻고 답해요
130만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
NCP배포도 동일하게 하면 될까요?
[제로초 강좌 질문 필독 사항입니다]질문에는 여러분에게 도움이 되는 질문과 도움이 되지 않는 질문이 있습니다.도움이 되는 질문을 하는 방법을 알려드립니다.https://www.youtube.com/watch?v=PUKOWrOuC0c안녕하세요! 초보 개발자입니다 회사에서 NCP를 활용하여 배포 하려고하는데 강좌에 나오는 AWS 배포방식과 동일하게 진행하면 되는걸까요.,? 물어볼곳이 없어 질문드립니다
-
미해결[웹 개발 풀스택 코스] Node.js 프로젝트 투입 일주일 전 - 기초에서 실무까지
오류가 어디서 나는지 알수가없습니다.ㅠ
뭐가 문제일까요 ??
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
16.1 S3 , 적용후 로그인시 에러 발생
S3 서비스 진행 중, 로컬에서 실행하면 페이지는 출력되는데 로그인시도를 하면 저런 메시지가 출력됩니다. 제가 보기엔 레디스 연결과 문제가 있는 것 같은데 어떻게 접근하면 좋을까요?
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
form태그의 enctype="multipart/form-data" 질문
이미지 형식을 보낼 때에는 form태그로 보내는 것이 아니라 이벤트 리스너를 통해 폼 데이터에 넣어서 보내는데 굳이 form태그의 enctype속성으로 "multipart/form-data"를 할당할 필요가 있었는지 궁금합니다.
-
미해결파이썬 Streamlit 활용한 웹 자동화 업무, 데이터 검색 및 시각화
강의에서 사용하는 로그 파일 자료 어디서 다운로드 받나요?
"텍스트 형태의 로그 파일을 가공처리 하는 방법" 강의에서 사용하는 로그 파일 자료 어디서 다운로드 받나요?
-
미해결MERN 스택으로 만드는 지도서비스(+ TypeScript)
[참고] 서버 보일러 플레이트에 axios 없네요~
8.26.기준 강의자료 서버 보일러 플레이트에 axios 없네요~ npm install axios모두 화이팅~~
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
몽고쉘 다운
몽고쉘 다운로드는 윈도우 유저만 해당인가요?
-
해결됨하루만에 배우는 express with AWS
성능테스트 관련 내용은 언제 업데이트되나요?
섹션 0에서 말씀해주신 성능테스트 관련 강의는 언제 업데이트될까요?
-
미해결사물인터넷 통신은 내 손에 (Arduino, MQTT, Nodejs, MongoDB, Android,VS Code)
MQTT 도표 관련 논문 인용
안녕하세요. 선생님. 강의 듣고 사물인터넷에 대해 이해가 깊어졌습니다.,다름이 아니고, 빅데이터 아키텍처 논문을 쓰고 있는데, 선생님께서 1강에서 설명하신 MQTT 도표가 저에게 필요해서요.그래도 쓰는것은 아니고, 제가 참조하여 그림과 같이 다시 그렸는데, 논문에 인용해도 될지 문의드립니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
npm run dev에서 오류가 납니다
C:\Users\HB\Desktop\fullstack-app\frontend>npm run devnpm ERR! Missing script: "dev"npm ERR!npm ERR! To see a list of scripts, run:npm ERR! npm runnpm ERR! A complete log of this run can be found in: C:\Users\HB\AppData\Local\npm-cache\_logs\2023-08-22T08_50_35_351Z-debug-0.logC:\Users\HB\Desktop\fullstack-app\frontend> 인터넷보고 package.json에 dev설정을 해줘야한다고해서 들어가봤는데 이미 되있더라구요그리고 package.json이 총 2개인게 맞나요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
npm run dev 오류
npm run dev 를 실행했더니[0] Error: listen EADDRINUSE: address already in use :::5000[0] at Server.setupListenHandle [as _listen2] (node:net:1751:16)[0] at listenInCluster (node:net:1799:12)[0] at Server.listen (node:net:1887:7)[0] at Function.listen (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\node_modules\express\lib\application.js:635:24)[0] at Object.<anonymous> (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\server\index.js:58:5)[0] at Module._compile (node:internal/modules/cjs/loader:1256:14)[0] at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)[0] at Module.load (node:internal/modules/cjs/loader:1119:32)[0] at Module._load (node:internal/modules/cjs/loader:960:12)[0] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)[0] at node:internal/main/run_main_module:23:47[0] Emitted 'error' event on Server instance at:[0] at emitErrorNT (node:net:1778:8)[0] at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {[0] code: 'EADDRINUSE',[0] errno: -4091,[0] syscall: 'listen',[0] address: '::',[0] port: 5000[0] }[0][0] Node.js v18.17.1[0] [nodemon] app crashed - waiting for file changes before starting...[1] [HPM] Proxy created: / -> http://localhost:5000[1] i 「wds」: Project is running at http://192.168.123.105/[1] i 「wds」: webpack output is served from[1] i 「wds」: Content not from webpack is served from C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\public[1] i 「wds」: 404s will fallback to /[1] Starting the development server...[1][1] Error: error:0308010C:digital envelope routines::unsupported[1] at new Hash (node:internal/crypto/hash:69:19)[1] at Object.createHash (node:crypto:133:10)[1] at module.exports (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\util\createHash.js:135:53)[1] at NormalModule._initBuildHash (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:417:16)[1] at handleParseError (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:471:10)[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:503:5[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:358:12[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:373:3[1] at iterateNormalLoaders (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:214:10)[1] at iterateNormalLoaders (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:221:10)[1] C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\react-scripts\scripts\start.js:19[1] throw err;[1] ^[1][1] Error: error:0308010C:digital envelope routines::unsupported[1] at new Hash (node:internal/crypto/hash:69:19)[1] at Object.createHash (node:crypto:133:10)[1] at module.exports (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\util\createHash.js:135:53)[1] at NormalModule._initBuildHash (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:417:16)[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:452:10[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\webpack\lib\NormalModule.js:323:13[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:367:11[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:233:18[1] at context.callback (C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\loader-runner\lib\LoaderRunner.js:111:13)[1] at C:\Users\sabc1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\node_modules\babel-loader\lib\index.js:59:103 {[1] opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],[1] library: 'digital envelope routines',[1] reason: 'unsupported',[1] code: 'ERR_OSSL_EVP_UNSUPPORTED'[1] }[1][1] Node.js v18.17.1[1] npm run start --prefix client exited with code 1이런 오류가 뜹니다.node version 이 맞지 않아 생기는 오류 같은데 확인 부탁드려요ㅠㅠ
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
Missing script : "dev"라고 나옵니다. 근데 package.json에 dev가 있거든요..ㅠ
무슨 문제일까요..?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
모듈이 없다는데요
npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm,npm WARN old lockfile so supplemental metadata must be fetched from the registry.npm WARN old lockfilenpm WARN old lockfile This is a one-time fix-up, please be patient...npm WARN old lockfilenpm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issuenpm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecatednpm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecatednpm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependenciesnpm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecatednpm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecatednpm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)npm WARN deprecated bcrypt@3.0.8: versions < v5.0.0 do not handle NUL in passwords properlynpm WARN deprecated node-pre-gyp@0.14.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the futurenpm ERR! code 1npm ERR! path C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! command failednpm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-buildnpm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)npm ERR! node-pre-gyp info it worked if it ends with oknpm ERR! node-pre-gyp info using node-pre-gyp@0.14.0npm ERR! node-pre-gyp info using node@18.17.1 | win32 | x64npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https downloadnpm ERR! node-pre-gyp info check checked for "C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node" (not found)npm ERR! node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v108-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v108-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v108-win32-x64-unknown.tar.gznpm ERR! node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@18.17.1 (node-v108 ABI, unknown) (falling back to source compile with node-gyp)npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v108-win32-x64-unknown.tar.gznpm ERR! gyp info it worked if it ends with oknpm ERR! gyp info using node-gyp@9.3.1npm ERR! gyp info using node@18.17.1 | win32 | x64npm ERR! gyp info oknpm ERR! gyp info it worked if it ends with oknpm ERR! gyp info using node-gyp@9.3.1npm ERR! gyp info using node@18.17.1 | win32 | x64npm ERR! gyp ERR! find Pythonnpm ERR! gyp ERR! find Python Python is not set from command line or npm configurationnpm ERR! gyp ERR! find Python Python is not set from environment variable PYTHONnpm ERR! gyp ERR! find Python checking if "python3" can be usednpm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an errornpm ERR! gyp ERR! find Python checking if "python" can be usednpm ERR! gyp ERR! find Python - "python" is not in PATH or produced an errornpm ERR! gyp ERR! find Python checking if Python is C:\Users\HB\AppData\Local\Programs\Python\Python39\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\AppData\Local\Programs\Python\Python39\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\HB\AppData\Local\Programs\Python\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\AppData\Local\Programs\Python\Python39-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\HB\AppData\Local\Programs\Python\Python38\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\AppData\Local\Programs\Python\Python38\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\HB\AppData\Local\Programs\Python\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\AppData\Local\Programs\Python\Python38-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\HB\AppData\Local\Programs\Python\Python37\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\AppData\Local\Programs\Python\Python37\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\HB\AppData\Local\Programs\Python\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\AppData\Local\Programs\Python\Python37-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\HB\AppData\Local\Programs\Python\Python36\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\AppData\Local\Programs\Python\Python36\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Users\HB\AppData\Local\Programs\Python\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Users\HB\AppData\Local\Programs\Python\Python36-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exenpm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be runnpm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python 3npm ERR! gyp ERR! find Python - "py.exe" is not in PATH or produced an errornpm ERR! gyp ERR! find Pythonnpm ERR! gyp ERR! find Python **********************************************************npm ERR! gyp ERR! find Python You need to install the latest version of Python.npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,npm ERR! gyp ERR! find Python you can try one of the following options:npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)npm ERR! gyp ERR! find Python - Set the environment variable PYTHONnpm ERR! gyp ERR! find Python - Set the npm configuration variable python:npm ERR! gyp ERR! find Python npm config set python "C:\Path\To\python.exe"npm ERR! gyp ERR! find Python For more information consult the documentation at:npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installationnpm ERR! gyp ERR! find Python **********************************************************npm ERR! gyp ERR! find Pythonnpm ERR! gyp ERR! configure errornpm ERR! gyp ERR! stack Error: Could not find any Python installation to usenpm ERR! gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:330:47)npm ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:159:21)npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:228:18)npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:294:16)npm ERR! gyp ERR! stack at exithandler (node:child_process:427:5)npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:439:5)npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12)npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)npm ERR! gyp ERR! System Windows_NT 10.0.19045npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\HB\\Downloads\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\HB\\Downloads\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"npm ERR! gyp ERR! cwd C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! gyp ERR! node -v v18.17.1npm ERR! gyp ERR! node-gyp -v v9.3.1npm ERR! gyp ERR! not oknpm ERR! node-pre-gyp ERR! build errornpm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29)npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:514:28)npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19045npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\HB\\Downloads\\boilerplate-mern-stack-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"npm ERR! node-pre-gyp ERR! cwd C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\bcryptnpm ERR! node-pre-gyp ERR! node -v v18.17.1npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0npm ERR! node-pre-gyp ERR! not oknpm ERR! A complete log of this run can be found in: C:\Users\HB\AppData\Local\npm-cache\_logs\2023-08-21T07_28_16_741Z-debug-0.logC:\Users\HB\Downloads\boilerplate-mern-stack-master>npm run dev> react-boiler-plate@1.0.0 dev> concurrently "npm run backend" "npm run start --prefix client"node:internal/modules/cjs/loader:1080 throw err; ^Error: Cannot find module 'C:\Users\HB\Downloads\boilerplate-mern-stack-master\node_modules\concurrently\bin\concurrently.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Module._load (node:internal/modules/cjs/loader:922:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: []}Node.js v18.17.1
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
타입스크립트 활용 질문
controllers/auth.ts의 passport.authenticate("local", (authError, user, info) => { ...부분에서 콜백함수의 매개변수들에 "매개 변수에는 암시적으로 'any' 형식이 포함됩니다.ts(7006)" 이런 에러가 발생해서const callback: AuthenticateCallback = (authError, user, info) => { ...이렇게 분리해서 타입을 붙여줬고, 매개변수 에러는 없어졌지만 밑에if (!user) { // 로직 실패 (유저가 없을 때) return res.redirect(`/?loginError=${info.message}`); }여기에서 info에선 "(parameter) info: string | object | (string | undefined)[] | undefined개체가 'undefined'인 것 같습니다.ts(2532)" 에러가 뜨고 message에선 "'string | object | (string | undefined)[]' 형식에 'message' 속성이 없습니다.'string' 형식에 'message' 속성이 없습니다.ts(2339)"에러가 떠서if (!user) { // 로직 실패 (유저가 없을 때) const infoWithMessage = info as { message: string }; return res.redirect(`/?loginError=${infoWithMessage.message}`); }이런식으로 타입에러 처리를 해줬습니다.그런데 테스트 코드 짤 때 100%가 나왔다 하더라도 의미없는 테스트 코드를 짤 수 있다고 경고하신 것처럼 이것도 타입스크립트 에러 처리를 해도 타입스크립트를 제대로 활용해서 타입 명시를 한 것인지, 아니면 그냥 에러 지우기만을 위해서 꼼수를 부린 것인지 어떻게 판단해야 할 지 모르겠습니다. 위 경우에 제대로 사용한 것이 맞는지, 어떤 기준으로 제대로 TS를 사용했다 판단하는 것인지 궁금합니다.
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
에러처리 미들웨어 타입 에러
질문1)app.use((err, req, res, next) => { res.locals.message = err.message; res.locals.error = process.env.NODE_ENV !== "production" ? err : {}; res.status(err.status || 500); res.render("error"); });이 부분에서 err, req, res, next 매개변수에 각각 "매개 변수에는 암시적으로 'any' 형식이 포함됩니다.ts(7006)" 에러가 떠서const errorHandler: ErrorRequestHandler = (err, req, res, next) => { console.error(err); res.locals.message = err.message; res.locals.error = process.env.NODE_ENV !== 'production' ? err : {}; res.status(err.status || 500); res.render('error'); }; app.use(errorHandler);이런식으로 타입을 달아줬는데 깃허브에선 errorHandler 분리까지만 되어있고 따로 타입을 달아놓지 않았더라고요. 이건 다른 방법으로 처리하셨나요?질문2) @types/express 설치했는데 왜 해당 에러처리 미들웨어에서만 타입 적용이 되지 않은 것이죠?
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
12.4 room.find is not a function/room.create is not a function 이 출력됩니다.
몽구스 연결하고, 실행하면, 연결성공 메시지까지 뜨는데, 접속하면 room.find is not a function이 출력됩니다. const Room = require('../schemas/room")을 const {Room}이나 const {Room, roomSchema}로 바꾸는 걸 해봐도 해결되진 않습니다.제 생각으로는 schemas/room 과 controller의 index가 제대로 연결되지 않는것으로 보이는데 어떻게 접근하면 좋을까요?
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
ES모듈 전환 질문
제가 지금까지 이해한 바로는, esModuleInterop를 true로 설정하면 CommonJS모듈에서 내보내기 한 것들을 ES모듈의 내보내기 한 것으로 변환 시켜주는데 CommonJS에선 module.exports나 exports.변수 나 둘 다 하나의 객체로 담겨져 보내지니 ES모듈의 내보내기로 전환될 땐 무조건 Default Export 방식으로 전환되는 것으로 알고있습니다. 그래서 ES모듈로 가져오는 것으로 바꿔줄 때에도 그냥 Default Export 를 가져오는 방식으로만 변환해주면 되는 것으로 아는데 const { Strategy: LocalStrategy } = require("passport-local"); 이 부분을import { Strategy as LocalStrategy } from "passport-local"이렇게 Named Export를 가져오는 방식으로 바꾸는 것이 가능한 게 이해가 되질 않습니다.import Strategy as from "passport-local" 이렇게 가져와서 따로 구조분해를 해야 하는 것이 아닌가요?
-
해결됨[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
TS7016에러 질문
노드 모듈을 import할 때 발생하는 TS7016에러는 @types를 설치하니 사라졌는데 import pageRouter from "./routes/page"; import authRouter from "./routes/auth"; import postRouter from "./routes/post"; import userRouter from "./routes/user"; import passportConfig from "./passport";부분은 error TS7016: Could not find a declaration file for module './models'. 'C:/Users/mikg2/Desktop/project-ts/models/index.js' implicitly has an 'any' type. 에러가 발생하는데 이것도 나중에 ts파일로 바꿔주면 사라지는 에러인가요? 그리고 제로초님 영상과는 달리 제 컴퓨터에서만 왜 해당 에러가 뜨는 건지 궁금합니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
npm run dev 실행시 오류
boiler plate가 설치된 폴더경로가 지정된 상태에서npm run dev를 입력했고 아래와 같은 오류가 뜹니다npm ERR! Missing script: "dev"npm ERR!npm ERR! To see a list of scripts, run:npm ERR! npm runnpm ERR! A complete log of this run can be found in:npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2023-08-17T13_33_04_142Z-debug.logconcerently 도 설치했고 package.json에 아래 처럼스크립트 dev 설정도 잘 되어 있는데 왜 에러가 뜨는건가요 "scripts": { "start": "node server/index.js", "backend": "nodemon server/index.js", "frontend": "npm run start --prefix client", "dev": "concurrently \"npm run backend\" \"npm run start --prefix client\"" },
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
nunjucks와 next.js 에 대해 문의드립니다
안녕하세요 선생님 넌적스로 화면 렌더링 진행해보았는데요넌적스도 서버사이드렌더링 방식이 맞는거지요..?그렇다면 이에 견주는게 next.js 인듯 한데 프론트와 관련해 다음으로 공부해야 할것을 정한다면 next.js 를 선택해도 좋을까요..?