본문 바로가기

error records

Error: EPERM: operation not permitted

반응형

 

 

Error: EPERM: operation not permitted, unlink ~

 

serverless 서버를 배포하다가 나온 에러

 

해결법을 찾아보니 여러개의 방법이 있었는데 

 

첫번째로 많은 사람들이 사용한 방법은 

1. 캐시 지우기
$ npm cache clean --force
2. 최신 버젼 npm 을 관리자 admin으로 설치하기
$ npm install -g npm@latest --force
3. 캐시 다시 지우기 
$npm cache clean --force

이었는데 나는 그대로 에러가 나왔다. 

 

에러 끝에 자세히 보니

Error: EPERM: operation not permitted, unlink '/Users/'userName'/Documents/project/batch-serverless/.build/node_modules'

batch-serveless 해당 프로젝트에 생성된 .build 안의 node_modules와 unlink ??되어 있다고 해서 

.build 폴더를 삭제했더니 해결되었다. 

 

 

스택오버플로우에 나온 더 많은 자세한 해결법은 ↘↘

 

References : https://stackoverflow.com/questions/39293636/npm-err-error-eperm-operation-not-permitted-rename 

 

npm ERR! Error: EPERM: operation not permitted, rename

When I execute npm install I get this error npm ERR! Error: EPERM: operation not permitted, rename C:\projects******\node_modules\react-async-script' -> 'C:\projects*******\node_modules.react-a...

stackoverflow.com

 

반응형