I am trying to run ng build in my project folder, but I get the following response:
bash: ng: command not found
Wha
In my case, I have just copied a whole repository (including its node_modules) from a Windows machine to a Linux machine, and running npx ng XXX failed with the following error:
npx: installed 1 in 1.677s
command not found: ng
The main issue was, of course, line breaks. Using the dos2unix package, I was able to overcome it:
sudo apt install -y dos2unix
dos2unix node_modules/.bin/ng
chmod +x node_modules/.bin/ng