Ionic commands return 'This app can't run on your PC' on Windows


#1

For some reason, out of nowhere, when I run commands like ionic serve or ionic info, I get the Windows alert:
"This app can’t run on your PC. To find a version for your PC, check with the software publisher"
Followed by an ‘Access is denied’ statement on the command prompt

I was able to run an ionic app with no problem just a week ago, and I haven’t done any major environment configurations since then. Not even updates. This has been entirely out of the blue, and I don’t know how to approach the problem.

Any ideas on what could be causing this issue, and how to fix it?


#2

Hi,

Can you show the log in your command line when you run ionic serve ? Your description is not clear.

Thanks,


#3

There are no logs. When I run ionic serve, I get that windows error pop up and it says ‘Access denied’ in the next line of the terminal window


#4

try

ionic serve --verbose

this may show you more


#5

Nope. I get the same error :frowning:

None of the ionic commands are working, including npm!


#6

Hi,

Maybe you don’t have the administrator permission from your account. I guess it have guest permission. That’s why it prevent a lot. Please login and check the permission of the account. Run the command line with Administrator permission and run ionic serve again.

Thanks,


#7

I am using an administrator account. I even created another administrator account, and I still get the same error.

Like I said - everything was working perfectly last week. This really has come out of nowhere, and I’m getting super frustrated about this random error. I can’t use npm to uninstall ionic either, because npm commands throw the same error as well!


#8

Hi

I fixed the issue by deleting Node JS and installing npm and ionic all over again. I don’t know why the issue happened in the first place, but thankfully that worked.