티스토리 뷰

반응형

npm install 혹은 uninstall을 할 때 다음과 같이 rename 오류가 발생할 때가 있다.

npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\Users\user\Desktop\Project1\node_modules\@react-native-community\datetimepicker 
npm ERR! dest C:\Users\user\Desktop\Project1\node_modules\@react-native-community\.datetimepicker-wMJFkihF
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\user\Desktop\Project1\node_modules\@react-native-community\datetimepicker' -> 'C:\Users\user\Desktop\Project1\node_modules\@react-native-community\.datetimepicker-wMJFkihF'
npm ERR!  [Error: EPERM: operation not permitted, rename 'C:\Users\user\Desktop\Project1\node_modules\@react-native-community\datetimepicker' -> 'C:\Users\user\Desktop\Project1\node_modules\@react-native-community\.datetimepicker-wMJFkihF'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'C:\\Users\\user\\Desktop\\Project1\\node_modules\\@react-native-community\\datetimepicker',
npm ERR!   dest: 'C:\\Users\\user\\Desktop\\Project1\\node_modules\\@react-native-community\\.datetimepicker-wMJFkihF'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs\2021-02-17T05_39_58_556Z-debug.log

 

이 때 다음을 차례대로 실행하면 정상적으로 동작한다.

cd android
./gradlew clean
cd ..
npm install //원래 하려던 코드 실행

 

반응형
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함