Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EBUSY: resource busy or locked, open 'PATH HERE'

Tags:

javascript

ide

I know that this was asked before, but I still can't fix my problem. I am still a novice and just learning Javascript currently. And when I tried to save my files yesterday I got this error : EBUSY: resource busy or locked, open 'C:\Users\User\Desktop\Practicing environment\index.html' I have no idea that means. I tried to restart my laptop and it worked for around 5 minutes at max. I can't keep on learning if I can't save it.

I tried to change IDE from Atom to Brackets and vice versa, still got the same error when I am trying to save my code.

Screenshot

like image 770
user3937122 Avatar asked Apr 24 '15 16:04

user3937122


People also ask

What is Ebusy?

EBUSY: “Device or resource busy.” A system resource that can't be shared is already in use. For example, if you try to delete a file that is the root of a currently mounted filesystem, you get this error.


1 Answers

So I'm a little late to the game here...4 years late, but this solution should work.

So this issue is arising because another program has that file open and could change its contents at any time (theoretically) and so your Operating System won't let you try to make changes too. This is typical to all OS's. You wouldn't want multiple copies of the same file open with different programs, because then you wouldn't really know which copy is the file of truth, or how to merge the changes properly, etc. Essentially you need to stop the program that is currently using that file so that you can read/write to it.

Anyways. If anyone looking for an answer here is using a Linux/Unix based OS, refer to this post.

If you're running into this issue on a Mac, the post above may work for you also since OSX is Unix based.

SOLUTION

If you're on Windows 10 (might work for older versions), you can just go to the file location in the file explorer, and try to move it to another folder. Don't try to delete it because it might actually work, but moving it should bring up a popup saying "File In Use" looking like this:

File In Use

So the popup here says "the file is open in Java(TM) Platform SE Binary". That's your ticket.

Now go into Task Manager (Ctrl + Shift + ESC in Windows), and find and select the program has the file open, and click 'End Task'. Now you should be free to use/alter/run the file that you couldn't before.

Also, in the end restarting your computer will do the same thing generally. But this is faster IMO.

Hope this helps some people. Cheers.

like image 108
Devin Carpenter Avatar answered Sep 28 '22 03:09

Devin Carpenter