Develop/React Native
[React Native] npm install rename 오류 해결 방법
노이지
2021. 2. 17. 21:49
반응형
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 //원래 하려던 코드 실행
반응형