Raspberrypi 2021. 4. 2. 22:44

VSCode로 라즈베리파이 빌드 시 메모리 부족

  • VSCode의 remote-ssh 플러그인으로 라즈베리파이에 연결하여 작업 중에 메모리 부족 문제가 발생했다.

  • yarn build로 프로젝트를 빌드하면 다음과 같은 에러가 발생했다.

      The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
  • VSCode 연결을 끊고 git bash로 ssh 연결해서 사용해보니 해결되었다.

  • 메모리 사용량 확인 명령어

      free -m  // 용량을 MB 단위로 출력
      free -h  // 용량 + 단위로 출력
      cat /proc/meminfo  // 메모리 사용량 상세

참고