There are several solutions to this perhaps same problem but none of the ones I found were of any help.
Yesterday I authenticated Github to vscode to be able to git push
my code up. Authentication was successful and I got no errors. I shutdown the server provided by webpack-dev-server and went to bed.
Today I opened up vscode, directed via the git-bash terminal to the project directory to execute yarn run serve
(the command to start the webpack server) like usually and got the following error:
bash: *path_to_command_directory /bin/sh: bad interpreter: Permission denied
git
works fine. However yarn
and npm
stopped working and return the error above. (Return as in shows in the command line the exact full line)
- Executing vscode as admin resolved the "permission issue" but that is something I'd like to avoid.
- Changing permission rules on the folders itself didn't resolve the issue.
- Reinstalling vscode (including the whole directories associated to it) didn't help.
- Regenerating the public key was no success as well.
After all this (except the as admin execution) nothing worked out.
I included vscode in the tags because it may be connected to. If possible I'll remove it after a solution was found.
The mentioned possible solutions are linked here:
- https://unix.stackexchange.com/questions/191080/bash-bad-interpreter-and-permission-denied
- "Permission denied" error from Visual Studio Code and Visual Studio (but not Git Bash)
- https://unix.stackexchange.com/questions/144347/bash-script-permission-denied-bad-interpreter
- https://www.enjoysharepoint.com/the-file-is-not-digitally-signed-powershell-script/
- VS Code's Terminal keeps returning "Permission Denied"
There are some more but they repeat the same solutions.