-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Is code fighting with npm? #28593
Comments
I had the same issue, for me updating to 5.0.3 (I had 5.0.0) fixed my issue. |
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) |
same issue here after upgrade to latest 1.13.0 |
@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 |
Sure - I'll give it a go tomorrow and report back |
Rolled back to 1.12.2 and I haven't experienced the issue again. It looks like the problem may be vs code |
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' |
Does the regression occur with PowerShell only? |
I use bash with VSCode (bash on Ubuntu on Windows 10), same problem. I have to close VSCode, perform |
@joaomoreno I can't think of anything I did that would cause this to regress, any related changes on your end? |
No idea... 😕 If it's Bash for Windows, then that could be an issue |
@johnnyreilly what shell are you using when you see this issue? |
@Tyriar FWIW we are using either the cmd in visual code or git bash shell. When the problem occurs if we use Unlocker it has a list of like 10-15 vscode processes locking it. Note we also tend to run 2-4 Visual code instances at the same time. |
I also tend to run the same number of Vs code instances (4 or 5 - one per npm module I'm working on). I'm using powershell in the terminal. |
Running into the same issue with Code 1.13.1 on Windows 10. Do an npm install while Code is open results in an Note: using Yarn instead of NPM seems to work just fine. Using a PowerShell console, NPM 5.0.3 and Code 1.13.1. |
FWIW it seems having more VS Code instances running increases the likelihood of encountering the issue. Colleagues of mine that only run with 1 VS Code instance at a time haven't been bitten by this. |
I was only running a single copy of VS Code when I tested this yesterday evening. It didn't fail the first time, it seems I needed to open a TypeScript file with an import of RxJS which was on one of the failing to install packages. |
In case it's relevant I should say that our codebase is TypeScript also (npm modules built with ts). So we often have a good number of TypeScript files open when installing. |
Running into the same issue with Code 1.13.1 on Windows 10. When doing a npm install in a separate bash console (cygwin) and having vscode open on same project most of the time I'm getting EPERM errors. After closing vscode npm install works without any problem. For me the issues ev. came with code 1.13, about 2 weeks ago. |
@rprichard could [email protected] have affected the permissions of the pty by chance? https://github.com/rprichard/winpty/releases/tag/0.4.3 There have been an increased number reports of EPERM errors since shipping it. |
I will do further tests with other shells. |
@WalterLeinert well I was assuming it was related to permissions and since winpty is the thing that actually launches the shell process, it could be related to that. Do people experiencing this issue have A/V software installed by chance? Medium/phantomjs#19 (comment) |
@Tyriar I have Windows Defender enabled on my Windows 10 machine. I did try and turn Defender completely off but was still experiencing the same issue. No other AV software running. |
I'm using avast and deactivating it had no effect. |
We're targeting early next week for 1.14. The current VSCode insiders builds match what we plan to ship with 1.14. You can test the fix using this: https://code.visualstudio.com/insiders Please let us know if you run into any issues |
@heinrich-ulbricht I also tried to get rid of the vscode issue by deactivating avast antivirus, but this had no effect. The only way for me was switching back to vs 1.12.2 as I wrote above. Regards, Walter |
@mjbvz fyi, |
Snap! |
VSCode update 1.14 seems to have resolved this |
Same issue with 1.14 here. Turning off antivirus software is not an option due to enterprise restrictions. Although I get "Error: EPERM: operation not permitted, scandir" it is very close to the issue above. |
This appears to still be a problem for me in VSCode 1.14.2.
|
Same here, "Error: EPERM: operation not permitted, scandir" for any npm install that's non-trivial (whether run from the integrated terminal or outside, no difference). Closing VSCode always solves this. VSCode 1.14.2. |
I don't think it's any directory. It's a specific module that I get this on myself: I'm using Windows, and so is @einarpersson. And on Windows, |
Yep @filipesilva, now that you mention it, I also have noticed that it |
@mjbvz does optional modules causing problems ring any bells perhaps? |
ok FYI: Still got the same issue with 1.15 and indeed it is always referring to \node_modules\fsevents\node_modules\getpass\node_modules. Strange thing is, it is occuring randomly, sometimes the first time, sometimes after 3 times executing an npm install. It is really annoying because I have to close the terminal every 10 mins. |
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 |
@mjbvz Should we open new issues for people who are still experiencing this issue? Or should this issue be reopened? |
There's an issue on npm for the same thing: npm/npm#17671 Perhaps the new problem is not related to VSCode directly. |
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! |
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. |
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. |
Downgrading to npm version 5.0.4 seems to have solved the problem for me @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? |
To be perfectly honest I don't think it's related to VSCode at all. I think that it's the combo of:
|
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? |
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 |
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 |
@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. |
My bad, my recollection was that I always reinstalled a second time and it seemed to be fine. |
I'm having the same issue here. Win 10 and VS Code 1.15.1 64-bit. Tried running as Administrator same issues. npm ERR! Failed to parse json npm ERR! Please include the following file with any support request: And running PowerShell while VSCode still open: PS C:\WINDOWS\system32> npm install gulp npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json' This is really a struggle. I think i will go back to 1.12 as it seems the best right now. Shaun |
Steps to Reproduce:
npm install
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...
The text was updated successfully, but these errors were encountered: