-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
NPM install fails for @vue/cli with Error: EPERM: operation not permitted, rename #2468
Comments
Update on this and then reran npm install -g @vue/cli and it worked so above pkg was not getting installed via cli process |
Seems like an npm issue: Some possible solutions worth a try:
|
npm cache clean -force |
Can't disable the antivirus; cleaning npm cache and running as admin doesn't help. |
I tough I was going crazy, can't install either. I clear the cache, run as admin, remove @VUE from roaming and nothing helps... |
@AleksueiR after a lot of trial/error this works: execute npm config edit set the value to 1000 (or any bigger number) |
@skayablars Thanks! I'll try that. This totally makes sense though - McAfee is likely locking files trying to scan them. I was getting nowhere with this yesterday and ended up installing vue-cli on a VM, and then copying the |
Something that I forgot to say is that I contact support in my company to disable McAfee while I resolved the issue |
Try run: npm uninstall vue-cli -g That's works for me |
sudo chown -R myusername: /usr/local/lib/node_modules This worked for me! |
Solution: yarn global add @vue/cli |
nothing is working from me. can you please help me |
I have the same error when I try to build my vue-cli app. Installing the dependencies and serving the app works fine. But ...
appears on Windows 10. Didnt try with Apple and Linux yet. What I have tried:
EDIT: My solution is linked in @sodatea 's answer: npm/npm#10826 (comment) I closed the Atom Editor |
I tried all of them like you but at last this thing for me Let me know if it works for you |
I had the same issue but using PS as admin as opposed to CMD as admin seems to have worked. No idea how or why. |
Try this command : npm install -g @vue/cli --cache /tmp/empty-cacheto use a temporary cache instead of nuking the actual one. |
Same issue here. Win10. A system restart solves my problem..... |
thanks npm cache clean --force works for me |
same issue. nothing is working. |
I had the same issue. The following command worked for me: |
Version
3.0.1
Reproduction link
http://nolink
Node and OS info
Node v8.11.4 / Windows 7
Steps to reproduce
npm install -g @vue/cli
What is expected?
Successful install
What is actually happening?
Error: EPERM: operation not permitted, rename
tried running as admin but still same error
end lines from log
8917 verbose unlock done using C:\Users\pkumar\AppData\Roaming\npm-cache_locks\staging-64e07ed02ac4e2e4.lock for C:\Users\pkumar\AppData\Roaming\npm\node_modules.staging
8918 verbose stack Error: EPERM: operation not permitted, rename 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json.189012702' -> 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json'
8919 verbose cwd C:\Users\pkumar\workspace\NodeJs\VUE\vue-cli3
8920 verbose Windows_NT 6.1.7601
8921 verbose argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "@vue/cli"
8922 verbose node v8.11.4
8923 verbose npm v5.6.0
8924 error path C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json.189012702
8925 error code EPERM
8926 error errno -4048
8927 error syscall rename
8928 error Error: EPERM: operation not permitted, rename 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json.189012702' -> 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json'
8928 error { Error: EPERM: operation not permitted, rename 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json.189012702' -> 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json'
8928 error cause:
8928 error { Error: EPERM: operation not permitted, rename 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json.189012702' -> 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json'
8928 error errno: -4048,
8928 error code: 'EPERM',
8928 error syscall: 'rename',
8928 error path: 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json.189012702',
8928 error dest: 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json' },
8928 error stack: 'Error: EPERM: operation not permitted, rename 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json.189012702' -> 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json'',
8928 error errno: -4048,
8928 error code: 'EPERM',
8928 error syscall: 'rename',
8928 error path: 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json.189012702',
8928 error dest: 'C:\Users\pkumar\AppData\Roaming\npm\node_modules\rimraf\package.json' }
8929 error Please try running this command again as root/Administrator.
8930 verbose exit [ -4048, true ]
The text was updated successfully, but these errors were encountered: