Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EBUSY: resource busy or locked, unlink

Sometimes when I try to launch the angular-cli command :

ng build --app myApplication -w 

I get the following error :

EBUSY: resource busy or locked, unlink 'C:\...\inline.bundle.js'

Any idea to overcome this problem?

like image 307
Brahim LAMJAGUAR Avatar asked Jul 26 '18 09:07

Brahim LAMJAGUAR


2 Answers

I had the same problem with google-services.json when trying to deploy the app to the device.

EBUSY: resource busy or locked, unlink 'C:\...\google-services.json'

Solution: Open task manager on windows and kill the Java(TM) Platform SE Binary process in task manager.

like image 83
Carlos Silva Avatar answered Sep 26 '22 16:09

Carlos Silva


here is a better workaround (bash on windows)

# for some reason keep getting UBUSY error so kill process
echo "killing any java.exe tasks"
cmd '/C TASKKILL /f /im java.exe'
like image 28
Rhubarb65 Avatar answered Sep 26 '22 16:09

Rhubarb65