"operation not permitted" while executing command "ionic cordova run android"

i’m getting EPERM: operation not permitted error while executing “ionic cordova run android” command, how to fix it?

F:\IOINC-PROJECTS\Auto-Service-Repair>ionic cordova run android
[INFO] Running app-scripts build: --platform android --target cordova

[16:33:14] build dev started …
[16:33:14] clean started …
[16:33:14] clean finished in 5 ms
[16:33:14] copy started …
[16:33:14] transpile started …
[16:33:16] transpile finished in 2.04 s
[16:33:16] preprocess started …
[16:33:16] deeplinks started …
[16:33:16] deeplinks finished in 80 ms
[16:33:16] preprocess finished in 82 ms
[16:33:16] webpack started …
[16:33:16] copy finished in 2.30 s
[16:33:22] webpack finished in 6.43 s
[16:33:22] sass started …
[16:33:23] sass finished in 761 ms
[16:33:23] postprocess started …
Error: EPERM: operation not permitted, unlink 'F:\IOINC-PROJECTS\Auto Service Re
at Error (native)

What is your ionic info output?
Does this file/folder exist? F:\IOINC-PROJECTS\Auto Service Repair\www\assets\fonts\roboto

Yes it’s exist

Capture ,

And ionic info is blow:

F:\IOINC-PROJECTS\Auto Service Repair>ionic info

cli packages: (C:\Users\Conference\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.12.0
ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.6.1


Android SDK Tools : 25.2.5
Node              : v6.11.3
npm               : 3.10.10
OS                : Windows 8.1


backend : legacy

This is old, you should upgrade it. Current version is 3.0.0


thanks @Sujan12 ,
It’s working fine now.

1 Like

So did you upgrade or did it fix itself?

it was version issue as you told.

I also had same issue and upgraded app-scripts to 3.0.0 and it worked after that. But after 2-3 times executing the command, i still see the same error.


for anyone that still with this problem the solution is to rename the folder called “roboto” to another name. (don’t forget to change in css too)

1 Like

This is not a solution because i need this font for my application! Any suggestion to still use this font?

RENAME, not “remove” … You must rename the folder and change It in css too, because (I guess) the problem is that the ionic apps script has some conflict when we create a folder called “roboto” in assets/fonts. I’m renamed the folder roboto to a random string and it’s Works.

1 Like

Thanks @alanalisson it worked for me.
I first tried to rename the folder to “roboto-custom” and it didn’t work, I had to rename it to a name which doesn’t contain “roboto” at all.

1 Like

Yep. Ran into the same thing. Moving the src/assets/fonts/roboto folder to something else (fonts/rob-o-to/, etc) worked. I am stunned this is a problem. Guessing it has something to do with the way the sass compiler, or webpack resolves file paths.