Reputation: 724
When I try to run, "ng serve" or any other ng command, I'm getting "zsh: permission denied: ng" error.
I'm using MACOS and already checked other posts to fix the problem but nothing helps, sadly. How can I change the permissions of a folder ( i also dont know which folder i should be working with) to fix my profile.
Upvotes: 3
Views: 6527
Reputation: 21
You just need to allow ng commands to execute with "chmod +x <script_path>" command. How I solved this:
Switched to default bash shell: chsh -s /bin/bash
;
Restarted OS;
Opened a terminal and tried any ng <command>
. The result looked something like this
bash: /usr/local/bin/ng : permission denied
Took the ng directory from the previous result and allowed to execute ng commands
chmod +x /usr/local/bin/ng
Executed my ng command.
There is probably more elegant way to do the same stuff, but this worked just fine.
You can switch back to zsh by writing chsh -s /bin/zsh
.
Upvotes: 2