I have recently installed Angular-CLI for use with Bamboo (Linux). I have verified that it works from the terminal, so I made a script task in Bamboo, which has one command: "ng build". But every time, logs show an error "ng: command not found".
What could be the source of this? The package has been installed globally, linked with NPM if that makes any difference, I have reinstalled it and verified cache, I have defined its path as an executable in Bamboo (command type, since Bamboo doesn't support Angular apparently?). I have made sure to check the command as the bamboo linux user, and it works there! But Bamboo itself doesn't see it, for some reason. Oh, and I'm using @angular/cli, as recommended.
I'm stumped, frankly. Any help would be greatly appreciated, I've been stuck on this for a few while now.
@SSS writes...
I have added a bounty as I am having the same problem.
I am running Atlassian Bamboo v6.2.2 on Windows Server, and I get this error:
23-Apr-2020 13:49:20 + ng build --configuration=develop
23-Apr-2020 13:49:20 + ~~
23-Apr-2020 13:49:20 + CategoryInfo : ObjectNotFound: (ng:String) [], CommandNotFoundE
23-Apr-2020 13:49:20 xception
23-Apr-2020 13:49:20 + FullyQualifiedErrorId : CommandNotFoundException
My PowerShell script runs fine if I run it under my own credentials. I even added
npm install -g @angular/cli
to the script immediately before the ng build command, but that doesn't work either.
I think it is just a case of the Bamboo agent not being able to find the ng CLI, but I can't work out where it is located.