React Native Widget, Error: EBUSY: resource busy or locked

During Custom Widget Creation, I am getting error message “EBUSY: resource busy or locked, rmdir 'C:\rootdir\Mendix\Widgets\customRadioButton\dist\MxTestProject\deployment'” Earlier I have created a native widgets, only I am facing this issue from “14-06-2020”. Below I explained the steps I followed during native widget development. Step 1: Created a widget using “yo @mendix/widget CustomRadioButton”. Step 2: Created new mendix native APP called “CustomRadioApp” Step 3: Moved “CustomRadioApp files into “CustomRadioButton/dist/MxTestProject folder. Step 4: After running the command “npm run dev”. All my files are deleted under “CustomRadioButton/dist/MxTestProject” folder location. 
2 answers

Hi Pad,

Look like you have some files open, that the gulp script tries to delete.

Do you have some files open in an other editor?

Try to delete the files from the deployment folder manually in the explorer.

Some tools like this can help you out finding, which program is locking files.

Cheers, Andries


Hi Andries,

Thanks for your reply. I tried your options, but no luck. Issue here is, while running the cmd “npm run dev” it’s deleting complete “dist/MxTestProject folder items” not only the deployment folder.  When system tries to delete the deployment folder, we are receiving error message “Error: EBUSY: resource busy or locked”.  I don’t know why it’s deleting complete folder items.

Folder Structure Before Running Command: