본문 바로가기

개발

(6)
Node.js Stream - 높은 퍼포먼스의 Node.js 애플리케이션 만들기 디스크에서 파일을 읽어오거나 인터넷에서 파일을 다운로드할 때 빠른 처리를 위해서 Stream을 사용하곤 한다. 유툽에서 동영상을 재생하거나 ott 프로그램으로 영상을 시청한 경험이 있을 것이다. 전체 영상 중 아주 조금만 불러와도 재생이 시작되며 나머지 부분은 시청동안 다운로드가 계속 진행된다. 바로 빠른 처리를 위해서다. Node.js의 stream도 작용방식도 이와 같다. Stream은 Node.js의 빌트인 모듈로, 데이터를 스트리밍할 수 있게 해 준다. 이 포스트에서 우리는 간단한 예제를 통해 stream 모듈 사용방법과 또한 높은 퍼포먼스를 위해 여러 개의 스트림을 연결해 파이프라인을 구성하는 법을 익혀볼 것이다. 아래로 고고! 👏 1. Node.js Stream의 종류 Node.js strea..
git pull시 cannot lock ref ~ : Unable to create ~ : Invalid argument (unable to update local ref) error: cannot lock ref 'refs/remotes/origin/blahblah-blah->blah': Unable to create 'C:/TEST/TESTREPO/.git/refs/remotes/origin/blahblah-blah->blah.lock': Invalid argument ! [new branch] blahblah-blah->blah -> origin/blahblah-blah->blah (unable to update local ref) git pull 했는데 위와 같은 오류가 나면서 git pull이 실패했다. 원인 Windows에서는 파일명에 다음과 같은 문자를 허용하지 않는다. \ / : * ? " | 위 에러메세지를 살펴보면 브랜치명 blahblah-blah-..
npm install시 -4048 에러 (operation not permitted, unlink ~) 모듈 정리가 싹 된걸 깃풀 받아서 npm install 했더니 아래와 같이 에러가 났다☠☠☠☠☠ error code EPERM error syscall unlink error path C:\###\###\node_modules\.staging\typescript-93036de9\lib\tsserver.js error errno -4048 error Error: EPERM: operation not permitted, unlink 'C:\###\###\node_modules\.staging\typescript-93036de9\lib\tsserver.js' error [OperationalError: EPERM: operation not permitted, unlink 'C:\###\###\node_modu..
Node 버전 업(v10.16.0) 이후 오류발생 (internalBinding is not defined) 아래 명령어 실행시켜서 설치해주면 해결된다👏 npm install natives@1.1.6
node 버전을 바꿔가며 개발하고 싶을때는 nvm 설치 (Windows) 프로젝트 별로 노드버전을 다르게 해서 개발해야하는 경우가 있다. 그럴때는 nvm을 이용하면 편하게 노드 버전을 변경할 수 있다. 1. nvm 설치 (windows) https://github.com/coreybutler/nvm-windows/releases 2. 원하는 노드 버전 설치 nvm install 10.16.0 (원하는 노드 버전) 3. 노드 버전 변경 nvm use 10.16.0 4. 노드 버전 변경되었는지 확인 node --version 5. 그리고 원래 하던대로 개발🤓 노드 명령어가 `지정된 경로를 찾을 수 없습니다` 와 같이 먹히지 않을경우 아래 링크를 참고. https://the-amy.tistory.com/2 nvm 설치 후 npm 명령어 안먹힐때 (node 지정된 경로를 찾을 수 없..
nvm 설치 후 npm 명령어 안먹힐때 (node 지정된 경로를 찾을 수 없습니다.) https://github.com/coreybutler/nvm-windows/issues/221#issuecomment-262363222 [Help]Cannot run 'node' or 'npm' command after nvm installed · Issue #221 · coreybutler/nvm-windows I'm trying to install nvm on my windows8.1(64bits). I do as the below orders: Download zip file. Unzip and install it. Configure the env path. Try to run 'nvm v' and it works well. Try ... github.com 위 링크 참고 후 해결함 1. nvm ..