-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: EPERM: operation not permitted, rename #191
Comments
You have found the problem ? |
Are you able to install other npm-based projects in this directory? Do you have any antivirus that would prevent these files from being moved around? I'm not sure why you wouldn't have permission to rename the file, but this seems to me like a Windows/npm issue? |
I've never had a problem with any other NPM projects in the past. I know that this is probably unique to my system, but I was hoping somebody would have seen the same issue. create-react-app works fine, but create-react-native-app still has the errors above. |
I got the same problem just doing an npm install. |
I'll assume that @fmeira's suggestion works and close this! If anyone has a solution for how we can just have this work out of the box for people with the same configuration as you folks then please open a PR or an issue with the idea! |
@fmeira solution worked for me as well - it looks like Windows Defender has started to get more aggressive of late?! I've blogged about it to try and let others know - so strange... https://blog.johnnyreilly.com/2017/06/windows-defender-step-away-from-npm.html |
thanks @johnnyreilly! nice post |
I run npm install -g npm and also npm install and it did not work for me! Still unable to install using npm using command like this: ionic cordova plugin add phonegap-plugin-push --variable SENDER_ID=xxxxxxxxx --save in my visual studio code. Any idea? |
Here is my try: https://github.com/drhouse7/react-native-try On Win8.1 I turned off Windows Defender Real-Time protection (I set also an exclusion to my node.exe path) however get this:
|
Hi, I am getting EPERM error when running |
these links may be helpful:
alas this is not a create-react-native-app issue but a npm issue |
Close any Node.Js process and retry with a new prompt window |
@bleuscyther worked for my, i had my react app running while i was trying to download react-navigation. |
I has having this problem at a university win7 machine. |
@johnnyreilly thanks for the post and the bug report on VS Code! It ended up being VS Code for me too. Updating to 1.14 fixed the issue! |
Awesome @hmafzal! |
This also happens for those that have their project directory within a Box sync folder. Perhaps with other services like Dropbox or Google Drive. Pausing the sync fixed the issue immediately. |
Had this issue with create-react-app. Turning off anti-virus (Trend Micro) and running npm cache clean didn't work. Then ran npm cache verify and tried again (with anti-virus still off) - voila! Don't know whether npm cache verify alone would've sufficed in my instance, but thanks @fmeira and @NULL-SWEAT! |
I had this issue w/ a different module, but figured i'd comment here. My fix was upgrading node & npm (specifically npm) using nvm: Working now. |
Upgrading the npm using npm install -g npm as resolved the issue for me. |
@afturner indeed, same for Dropbox, paused syncing fixed the issue... |
I got the same error, |
After huge struggle found the solution for me .. 👍 "Create new folders" "move npm prefix and the cache" "Update the npm config for prefix and cache" https://alastaircrabtree.com/fixing-intermittant-eperm-operation-not-permitted-on-npm-install/ |
Closing the project in expo XDE before installing solved my problem |
Instead of turning off Windows Defender Real-Time protection I just set a folder exclusion. |
I get the error with npm 5.4 but not with npm 5.3. Maybe try this:
This does not seem to be an issue with create-react-app. I got the same problem with other apps as well. |
It seems to be the Node.js issue isaacs/node-graceful-fs#104 (comment) That would explain that such weird workaround as There are many issues on GitHub placed regarding the EPERM problem and looks like most of such issues just go to the "closed" state without the actual resolution. You can see more details here isaacs/node-graceful-fs#119 |
We had this issue writing files from node to a remote server. We upgraded from v 0.12.2 to 8.10.0 and this began occurring, So we ran 'node cache verify' and it cleared the problem. |
Solved!! Turn off react-native. npm install, which will now work, and restart react-native. That's all. I had the same problem. I couldn't understand why it told me to re-run from a cmd with admin permissions, while I was running with admin. Turned out that you have to close the running react-native-cli (which I had started with So maybe to close this issue also add that to the user message. Something like: |
try to add full permission on npm folder |
I got the same problem just doing an npm install --save react-navigation |
@johnnyreilly thanks... had the same issue. |
In windows 10, I don't see real time protection under windows defender. However, I see it under my antivirus software. Turning it off, the problem goes away. |
@fmeira thanks, your suggestion works. |
After Turning off - real time protection in antivirus I had to delete my .gitignore as the command I was running creates it if does not exist so after this the problem goes away. |
Description
Getting windows rename error when attempting to run
create-react-native-app myApp
Expected Behavior
Following setup instructions, I installed create-react-native-app globally then attempted to create a new project. I have done this on Mac with no problem, but Windows returns a series of "operation not permitted" errors
Observed Behavior
Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts
:`-- (empty)
npm ERR! code 1
npm ls react-native
:`-- (empty)
npm ERR! code 1
npm ls expo
:`-- (empty)
npm ERR! code 1
node -v
: v6.9.1npm -v
: 3.10.8yarn --version
: bash: yarn: command not foundwatchman version
: bash: watchman: command not foundAlso specify:
Reproducible Demo
App wouldn't setup, so no demo except for above stack trace.
The text was updated successfully, but these errors were encountered: