You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Experience some variant of npm ERR! Error: EPERM: operation not permitted, rename
Close code, perform the operation in powershell / cmd. Operation succeeds.
I've only just started experiencing this in the last week or so and it's not consistent. Sometimes installs succeed. But I've experienced it on 2 separate computers, both running code and wondered if that could be the common factor...
Reacted by kenoyer130, Michael McDonald, Matt Garven, Michael DePouw, Ted Zyzsdy, Jan Piotrowski, Laffargue Michael, Moritz Frölich, Nicolas HENRY, Pankaj Parkar and 7 more
I tried the latest versions from 3/4/5 including 5.0.3. I'm pretty sure I received it consistently with all though (error message differed slightly but same general gist)
As an aside, I also noticed that the "right click on taskbar / left click on recent folder" vs code launch functionality also works with 1.12.2 whereas it mostly doesn't in 1.13.0. Has that been raised elsewhere as well?
Hi, we are a development team of 30 plus developers and this just started to happen and is killing us. Is there an ETA on a fix? Also we have had problems where the file will be corrupted and have to be manually deleted even after closing Visual Code.
The same Error: EPERM: operation not permitted, rename 'foo' -> 'foo.DELETE'
I use bash with VSCode (bash on Ubuntu on Windows 10), same problem. I have to close VSCode, perform npm install, and start VSCode again. If I run npm install while VSCode is running, it fails for random packages. The error occurs with bash running in VSCode and with bash running independently.
Had the same issue indeed without VSCode, but I did have Visual Studio 2017 open which was running a TSServer. Still might not be related though, but I don't think it is VSCode it's fault.
Downgrading to npm version 5.0.4 seems to have solved the problem for me
(npm install -g [email protected])
Filipe Silva (@filipesilva): Yes, it seems to be a more general problem of npm not being happy with many processes working on the same files. npm/npm#17671 That would explain why the problem arises when you're working in the same folder in vscode, perhaps?
Well, even if the root cause isn't VSCode there still seems to be a correlation. I can at least on my part say that I've had a lot of problems installing npm packages while in the VSCode terminal but not as much as when I've closed VSCode. And the second install does not always work for me. But it's not a 1-1 causation and reading from the other thread I would agree that the problem seems to has it root somewhere else.
In any case, downgrading npm seems to work 100% for now for me at least. How about you?
What I find strange about all those new comments saying that it may not be an issue with VSCode but with npm itself, is that I downgraded and sticked with VSCode 1.12.2 (as suggested here) since this issue appeared and never experienced it again...
Filipe Silva (@filipesilva) The problem does not always go away if you install a second time. This works only some of the times. In fact: if this problem happens, I can only rarely resolve the error by running npm install again.
Closing VSCode does always solve the problem, however (for me, at least), and I've only once seen the problem without VSCode running.
So to me, current VSCode versions at the very least cause the bug to surface, while older versions of VSCode do not, regardless of where in the source code or in which program the bug actually resides.
I'm having the same issue here. Win 10 and VS Code 1.15.1 64-bit. Tried running as Administrator same issues.
Running Terminal in VSCode
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "gulp"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! file C:\Users\ShaunPitt\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: C:\Users\xxxxxxxx\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\xxxxx\some-folder\npm-debug.log
And running PowerShell while VSCode still open:
PS C:\WINDOWS\system32> npm install gulp
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon
as possible. Use 'npm ls graceful-fs' to find it in the tree.
C:\WINDOWS\system32
`-- [email protected]
npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.
This is really a struggle. I think i will go back to 1.12 as it seems the best right now.
Activity
DickvdBrink commentedon Jun 13, 2017
I had the same issue, for me updating to 5.0.3 (I had 5.0.0) fixed my issue.
What is your npm version?
johnnyreilly commentedon Jun 13, 2017
I tried the latest versions from 3/4/5 including 5.0.3. I'm pretty sure I received it consistently with all though (error message differed slightly but same general gist)
yizhoucao commentedon Jun 13, 2017
same issue here after upgrade to latest 1.13.0
Tyriar commentedon Jun 13, 2017
John Reilly (@johnnyreilly) could you install 1.12.2 and see if you have the same issue? https://az764295.vo.msecnd.net/stable/19222cdc84ce72202478ba1cec5cb557b71163de/VSCodeSetup-1.12.2.exe
johnnyreilly commentedon Jun 13, 2017
Sure - I'll give it a go tomorrow and report back
johnnyreilly commentedon Jun 14, 2017
Rolled back to 1.12.2 and I haven't experienced the issue again. It looks like the problem may be vs code
johnnyreilly commentedon Jun 14, 2017
As an aside, I also noticed that the "right click on taskbar / left click on recent folder" vs code launch functionality also works with 1.12.2 whereas it mostly doesn't in 1.13.0. Has that been raised elsewhere as well?
kenoyer130 commentedon Jun 16, 2017
Hi, we are a development team of 30 plus developers and this just started to happen and is killing us. Is there an ETA on a fix? Also we have had problems where the file will be corrupted and have to be manually deleted even after closing Visual Code.
The same Error: EPERM: operation not permitted, rename 'foo' -> 'foo.DELETE'
Tyriar commentedon Jun 16, 2017
Does the regression occur with PowerShell only?
rstropek commentedon Jun 16, 2017
I use bash with VSCode (bash on Ubuntu on Windows 10), same problem. I have to close VSCode, perform
npm install, and start VSCode again. If I run npm install while VSCode is running, it fails for random packages. The error occurs with bash running in VSCode and with bash running independently.68 remaining items
ccarse commentedon Aug 21, 2017
I'm also having this problem, usually with the fsevents package. I am also running anti virus that I cannot disable. I'm running 1.15.1
ccarse commentedon Aug 21, 2017
Matt Bierner (@mjbvz) Should we open new issues for people who are still experiencing this issue? Or should this issue be reopened?
filipesilva commentedon Aug 21, 2017
There's an issue on npm for the same thing: npm/npm#17671
Perhaps the new problem is not related to VSCode directly.
ccarse commentedon Aug 21, 2017
You know I think you're right. Usually closing code fixes this issue but it's still happening for me now even when code's not running. Thanks!
DickvdBrink commentedon Aug 22, 2017
Had the same issue indeed without VSCode, but I did have Visual Studio 2017 open which was running a TSServer. Still might not be related though, but I don't think it is VSCode it's fault.
twastvedt commentedon Aug 23, 2017
For me this is still an issue. I am able to install just fine after closing VSCode so it does seem to be an issue with VSCode and not npm.
einarpersson commentedon Aug 25, 2017
Downgrading to npm version 5.0.4 seems to have solved the problem for me
(
npm install -g [email protected])Filipe Silva (@filipesilva): Yes, it seems to be a more general problem of npm not being happy with many processes working on the same files. npm/npm#17671 That would explain why the problem arises when you're working in the same folder in vscode, perhaps?
filipesilva commentedon Aug 25, 2017
To be perfectly honest I don't think it's related to VSCode at all. I think that it's the combo of:
einarpersson commentedon Aug 25, 2017
Well, even if the root cause isn't VSCode there still seems to be a correlation. I can at least on my part say that I've had a lot of problems installing npm packages while in the VSCode terminal but not as much as when I've closed VSCode. And the second install does not always work for me. But it's not a 1-1 causation and reading from the other thread I would agree that the problem seems to has it root somewhere else.
In any case, downgrading npm seems to work 100% for now for me at least. How about you?
filipesilva commentedon Aug 25, 2017
I didn't try downgrading because I had a bunch of problems with older 5.x versions... I tried upgrading to 5.4 and ran into npm/npm#18287.
There's a report of using
--no-optionalto fix these issues as well in #17671 (see my comment npm/npm#17671 (comment) and the commit right above it).electrotype commentedon Aug 25, 2017
What I find strange about all those new comments saying that it may not be an issue with VSCode but with npm itself, is that I downgraded and sticked with VSCode
1.12.2(as suggested here) since this issue appeared and never experienced it again...rubenprins commentedon Aug 25, 2017
Filipe Silva (@filipesilva) The problem does not always go away if you install a second time. This works only some of the times. In fact: if this problem happens, I can only rarely resolve the error by running npm install again.
Closing VSCode does always solve the problem, however (for me, at least), and I've only once seen the problem without VSCode running.
So to me, current VSCode versions at the very least cause the bug to surface, while older versions of VSCode do not, regardless of where in the source code or in which program the bug actually resides.
filipesilva commentedon Aug 25, 2017
My bad, my recollection was that I always reinstalled a second time and it seemed to be fine.
shaunpitt commentedon Aug 28, 2017
I'm having the same issue here. Win 10 and VS Code 1.15.1 64-bit. Tried running as Administrator same issues.
Running Terminal in VSCode
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "gulp"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! file C:\Users\ShaunPitt\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: C:\Users\xxxxxxxx\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\xxxxx\some-folder\npm-debug.log
And running PowerShell while VSCode still open:
PS C:\WINDOWS\system32> npm install gulp
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon
as possible. Use 'npm ls graceful-fs' to find it in the tree.
C:\WINDOWS\system32
`-- [email protected]
npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.
This is really a struggle. I think i will go back to 1.12 as it seems the best right now.
Shaun