'ng' is not recognized as an internal or external command
I am somewhat of a newbie to angular. I am getting TeamCity set-up to build 4 .NET elements of my system and 2 angular. One of the Angular front-end pieces is Angular 1.5 (or older at least) and this builds for me in team city as follows:
Node.js plugin
Node.js NPM Runner
run-script build
Where "build" is "gulp build" in my package.json
****So that one works...but then I have this second angular project whose "build" is defined by package.json as, "ng build". This is a Angular 6.0 project...newer build scheme. Like I said, I'm new to angular and while I've poked-around in each codebase I'm easily confused by the npm, ng toolchain at this point.
With "build" as "ng build" for this project, my build fails in team city as follows...This works for me from power shell: ng resolves. It's like something is missing from the node.js plugin to team city or I have it configured wrong. Any ideas?
Please sign in to leave a comment.
Hi,
the "is not recognized as an internal or external command" is a message coming from Windows itself, indicating that it's trying to run the process but cannot find the path to the executable. Builds in teamcity are started from the build agent's process, and thus inherit the build agent's environment. Please make sure that the build agent has the required tools in its PATH environment variable. This will usually require tweaking the user that runs the process and restarting the user session (or the machine).
Could you check whether this works for you?