Sungtt

npm run build 시 permission denied 본문

프로젝트/개인 프로젝트 [공책게임]

npm run build 시 permission denied

sungtt 2022. 9. 23. 01:52

git actions에서 ssh를 통해 들어가 npm run build를 실행할 때 권한이 없다는 오류를 만났다.

build하려는 프로젝트폴더로 이동하여 아래 명령어를 적용하여 해결했다.

sudo chown -R username: [path]./node_modules

 

username은 whoami 를 치면 나오는 값을 사용하고

node_modules가 있는 디렉토리로 이동하여 사용했다.

sudo chown -R ec2-user: ./node_modules

 

Comments