Closed barbalex closed 8 years ago
npm cache clean worked for me as well.
Hey all, I was trying this over and over with different admin rights, npm cache clean
etc etc with no joy.
I then did the following, and had success... though not sure yet which piece(s) of the puzzle helped.
App Data\node-cache
npm cache clean
Update on above - it seems, for me at least, that the issue was having the project folder open in sublime text. Nuts!
Had the same issue, had to close Sublime entirely and npm cache clean before it finally worked. Strange too because I always have Sublime open and never had a problem until now.
Ran into the same problem with installing lodash.
Finally worked with these steps:
npm cache clean
node_modules
directorynpm install lodash --save
Same Issue please help node -v v7.5.0 npm -v 4.1.2 NOTE: tried doing "npm cache clean" didn't work
npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v7.5.0 npm ERR! npm v4.1.2 npm ERR! path C:\Users\Chiranjeevi\Desktop\angularJS\ang2\angular2-seed\node_modules.staging\base64id-47d544ab\package.json.1971791659 npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Chiranjeevi\Desktop\angularJS\ang2\angular2-seed\node_modules.staging\base64id-47d544ab\package.json.1971791659' -> 'C:\Users\Chiranjeevi\Desktop\angularJS\ang2\angular2-seed\node_modules.staging\base64id-47d544ab\package.json' npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Chiranjeevi\Desktop\angularJS\ang2\angular2-seed\node_modules.staging\base64id-47d544ab\package.json.1971791659' -> 'C:\Users\Chiranjeevi\Desktop\angularJS\ang2\angular2-seed\node_modules.staging\base64id-47d544ab\package.json' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Chiranjeevi\Desktop\angularJS\ang2\angular2-seed\npm-debug.log
Have been having the issue on win7 RN 0.41.
After 2 days I found it !!
you need to manually delete the "build" folder inside: my_react_native_app\android\app
See that it works, and come back here and give this a post a party icon, to save hours of frustration for other RN devs (-:
Updating to node 6 fixed this for me. I also deleted everything node-related in %appdata%\roaming
, but I had done that before updating to node 6, and it didn't help, so it's hard to say if that deletion was important.
I had the same problem and I tried many of the suggestions mentioned above none worked. Finally switched my account to a user account instead of an administrator account in Win 10 Home. This solved my problem
I fixed this by moving the entire project folder to a different partition. It seems Windows hates it when it is on C: drive.
I struggled with this error message when I tried to install packages with npm. During this struggle I tried the following with no success:
What finally solved my problem was when I installed npm-junction! (as suggested here https://github.com/npm/npm/issues/3861) + running as administrator
Hi everyone. I had the same issue, both 4058 with "rename" and 4048 with "unlink" phases of npm install. npm cache clean and stop Windows Defender didn't help. I finally have resolved this by un-sharing a parent folder of the project. After remove folder sharing with everyone, all npm-install works fine.
I struggled as many did above installing angular cli on Windows 7 behind a corporate proxy. Turns out, it seems to be the Windows cmd windows itself somehow causing the issue. I used Cygwin and it worked the first time.
Opened Cygwin as root - not sure if the root was necessary.
npm config set https_proxy=https://myusername:mypassword@webproxy.mycompany.com:8080 npm cache clear npm install -g @angular/cli
I Delete the npm folder in C:\Users\Administrator\AppData\Roaming\npm ,Retry npm install And It works! so fxxking windows
npm cache clear worked for me. Thanks!!
for me the issues was,i opened the cmd prompt normally which was not having permission to create a new directory,so i ran the cmd prompt as administrator which was able to create new directory.problem solved
For me, rebooting the computer removed the file locks and I was able to install the package.
I had this problem and it was because I had the folder open in Android Studio. Trying to rename the folder in Windows Explorer and that helped to understand what was going on because you got a clearer error message "Another program has the file open". Hope that helps someone.
I had this problem as well. What worked for me:
Unhide AppData folder if it is hidden.
Following steps worked for me:
Solution for me was:
del package-lock.json
rd /s /q node_modules
npm cache clear --force
npm i
This is an issue with Visual Studio Code. It must be holding onto a process which is blocking the npm install
script.
try disabling your anti virus
If you are using Visual Studio Code and have this problem, here is an issue about that you can track: https://github.com/Microsoft/vscode/issues/28593
i installed for windows 7,64bit npm cache clean solve the issue for me,TQ guys
I also got the same issue, then i just disabled the avast antivirus, then it worked for me. thank you guys .
npm cache clean -f
"npm cache verify" solved the issue on mine instead of "npm cache clean -f". I have npm 5.3.0 and it seems like npm recommends "verify" instead of "clean" to fix cache corruption problems.
I rolled my version of npm back to 4.2.0. things worked then and now I am back up and running.
npm install -g npm@4.2.0
I try to rm -rf .node-sass.DELETE. it works
Problem seemed intermittent until one day just always presented itself. I have a network mounted drive for the files in question and Avast AV as well. None of the solutions above worked (npm cache clean -f worked sometimes until nothing worked). Then I found this. Solution: https://alastaircrabtree.com/fixing-intermittant-eperm-operation-not-permitted-on-npm-install/
Just run cmd as administrator and keep updated node v6.11 and npm v5.3
Then after that you can use all features of global node packagers without running cmd as administrator.
I am fairly new to npm and I have been fondling with this problem since yesterday. One thing that I noticed ist that it always failed at a "post-install script" I don't know if this belongs to the modules or to npm itself. Affected pacakges I recall: electron, angular, jquery
Spend about 8 to 10 hours total to figure this out, which included: Reinstalling node and npm multiple times Re-applying all windows file permissions. Downgrading node / npm. Disabling Windows Defender. Clearing the npm-cache ("even though I apparently am not supposed to do that."
However, what I found working in the end: use --force
I am so done.
Similar issue on vsts - windows hosted agent with npm@5.4, installing npm@5.3 works.
None of the above worked for me (clearing cache, disabling antivirus, reinstalling node/npm, etc.). What eventually worked for me was deleting these folders.
C:\Users\[username]\AppData\Roaming\npm
C:\Users\[username]\AppData\Roaming\npm-cache
with npm@5.4: npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink rolling back to npm@5.3 works
I had the same issue with unlink
on Windows, resolved using npm i -g npm@5.3
, so it looks like an issue with NPM 5.4.
Solution.
npm uninstall npm -g
npm install npm@5.3 -g
Congratulations!
npm cache verify
did help.
EchoDeveloper, thanks! Real work for me: npm uninstall npm -g npm install npm@5.3 -g
I deleted these folders:
C:\Users\[username]\AppData\Roaming\npm
C:\Users\[username]\AppData\Roaming\npm-cache
Then;
npm --force uninstall npm -g
npm install npm@5.3 -g
And, IT WORKED!!
Disabling the antivirus worked for me too. I just had to talk to one of our sys admins to do that for me as I do not have permission.
After huge struggle found the solution for me .. 👍
"Create new folders"
mkdir E:\Buildagent\npm
mkdir E:\Buildagent\npm-cache
"move npm prefix and the cache"
robocopy c:\Users\the-build-user\AppData\Roaming\npm E:\Buildagent\npm
robocopy c:\Users\the-build-user\AppData\Roaming\npm-cache E:\Buildagent\npm-cache /E /MOVE
"Update the npm config for prefix and cache"
npm config set prefix E:\Buildagent\npm
npm config set cache E:\Buildagent\npm-cache
https://alastaircrabtree.com/fixing-intermittant-eperm-operation-not-permitted-on-npm-install/
this is fxxking annoying me, none of above solutions works for me, im thinking of leaving reactjs now
ps. npm install -g npm@5.3 works for me now, finally...
@jesshyl don't let the (dis)functionality of npm put you off reactjs. In fact, the two have little to do with each other, npm merely supplies you with packages! If you don't want to live with the brokenness of npm, you can use yarn instead, which works as a drop-in replacement.
logging in as root/Administrator on Windows fixed the issue for me. That is, the "Administrator" Account. Another account with Administrator privileges was not sufficient
@Mardoxx thx mate , problem fixed now , i modified the edition of npm from 5.4 to 5.3, and finally successed...
I m too facing same issue with Node version - 8.4.0 npm version - 5.4.0 (tried 5.3/ 5.2/5.1) OS - windows
Eror log -
npm WARN Error: EPERM: operation not permitted, scandir 'F:\Users\apatil\workspace\mv5\node_modules\fsevents\node_modules\dashdash\node_modules' npm WARN { Error: EPERM: operation not permitted, scandir 'F:\Users\apatil\workspace\mv5\node_modules\fsevents\node_modules\dashdash\node_modules' npm WARN stack: 'Error: EPERM: operation not permitted, scandir \'F:\Users\apatil\workspace\mv5\node_modules\fsevents\node_modules\dashdash\node_modules\'', npm WARN errno: -4048, npm WARN code: 'EPERM', npm WARN syscall: 'scandir', npm WARN path: 'F:\Users\apatil\workspace\mv5\node_modules\fsevents\node_modules\dashdash\node_modules' } npm verb npm verb Please try running this command again as root/Administrator. npm verb stack Error: ENOENT: no such file or directory, chmod 'F:\Users\apatil\workspace\mv5\node_modules\sequelize-cli\lib\sequelize' npm verb stack at runAction (C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\lib\install\actions.js:74:13) npm verb stack at actions.(anonymous function) (C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\lib\install\actions.js:50:17) npm verb stack at execAction (C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\lib\install\actions.js:197:18) npm verb stack at runCallback (timers.js:781:20) npm verb stack at tryOnImmediate (timers.js:743:5) npm verb stack at processImmediate [as _immediateCallback] (timers.js:714:5) npm verb stack From previous event: npm verb stack at withInit (C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\lib\install\actions.js:165:15) npm verb stack From previous event: npm verb stack at withInit (C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\lib\install\actions.js:181:13) npm verb stack at runSerial (C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\lib\install\actions.js:164:10) npm verb stack at doSerial (C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\lib\install\actions.js:145:3) npm verb stack at Array.
(C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8) npm verb stack at LOOP (C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\node_modules\slide\lib\chain.js:15:14) npm verb stack at C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\node_modules\slide\lib\chain.js:18:7 npm verb stack at withInit.nodeify (C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\lib\install\actions.js:137:5) npm verb stack at runCallback (timers.js:781:20) npm verb stack at tryOnImmediate (timers.js:743:5) npm verb cwd F:\Users\apatil\workspace\mv5 npm verb Windows_NT 10.0.14393 npm verb argv "C:\Program Files\nodejs\node.exe" "C:\Users\apatil\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "i" "--verbose" npm verb node v8.4.0 npm verb npm v5.3.0 npm ERR! path F:\Users\apatil\workspace\mv5\node_modules\sequelize-cli\lib\sequelize npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall chmod npm ERR! enoent ENOENT: no such file or directory, chmod 'F:\Users\apatil\workspace\mv5\node_modules\sequelize-cli\lib\sequelize' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm verb exit [ -4058, true ]
@neilrackett It's work for me,Thx
I work on Windows 10, up to date installation.
npm i
runs in powershell node v5.2.0 npm v3.3.12This error occures every time. I have repeated 5 times, deleting the node_modules folder beforehand. I have also run it twice as administrator. It works on my OsX notebook.
Here the error message in powershell:
This is the complete log from npm-debug.log: https://gist.github.com/barbalex/da6100299bf5b76f19c2
This is the project: https://github.com/barbalex/ae This is package.json: https://github.com/barbalex/ae/blob/master/package.json