Solved: Ionic ENOENT Invalid device state error when using sudo on Mac

I was trying to launch a sample app on the newly released Ionic 2 Release Canditate. When I ran the command sudo ionic run ios --emulator, I encountered an error similar to this one which I shorted for display here:
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Invalid device state

Error: ENOENT: no such file or directory, stat '/Users/.../Library/Logs/CoreSimulator/.../system.log'
After searching the internet for solutions, I was able to overcome the error by taking the following steps:

  1. Install the latest update to Xcode.
  2. Run xcode-select --install to make sure that Xcode command line tools is installed (as recommended by Mike Hartington on the Ionic Github page.)
  3. Run sudo chown -R username /Users/username to update my permissions which makes it so that I don't have to run sudo when running ionic commands (as recommended by Zac Vineyard on his blog.)
  4. Run ionic run ios --emulator (this time without using sudo).
Thank you for the help guys!


Comments

Popular posts from this blog

Tic Tac Toe - Using App Inventor Beta

Xamarin Forms vs React Native