Search code examples
ionic-frameworkionic3hybrid-mobile-app

Images permissioning issue in IONIC 3 on OSX


I know how to use images in the imgs folder of the ionic the problem is something like this

1: I was trying to get to know with hotspot feature of OSX and accidentally I changed the name of my computer's local network which caused my NPM to crash, means no build were possible for IONIC except using SUDO commands which is not recommended by IONIC guys.

2: here what I did!! I uninstalled everything of IONIC ,NODE,NPM and CORDOVA and reinstalled them globally and all things worked just fine and all commands got back in action EXCEPT this new issue!

now that I was using images in img folder before all that mess !

whenever I run a command either to build or emulate I get unable to access images error CAUSE PERMISSION ISSUES

here are the snapShots

enter image description here

enter image description here


Solution

  • well after a deep search I have found a solution thnx to my teacher Mike Hartington

    here it is!!! how to solve the issue

    I ran an ionic command with sudo most likely, which had changed the permissions of mine project

    to solve I did this!

    ran this command

    sudo chown -R $(whoami) ~/<Path/to/project
    

    then ran my build or emulate commands without sudo and every thing came to normal hope this helps!