Problem with node.js build step requirement
Hi, hope one of you has a solution to this error.
Last week our agent suddenly stopped building frontend build configurations - based on node.js.
I notice, that the problem is the unmet build step requirement “node.js.npm exists”. See attached screenshot.
But how can I fix this?
Please sign in to leave a comment.
Hello!
It appears that you use the older NPM plugin (https://github.com/jonnyzzz/TeamCity.Node) which was not updated for a while; newer versions of TeamCity have Node.JS runner out of the box which uses an official Docker image to run the builds. May I suggest to consider switching to that runner?
In regards to the issue itself, looks like the plugin could not detect NPM on the agent machine. It appears that agent will run npm --version on startup and try to derive the version out of the command output; if you restart the agent, the relevant logging in teamcity-agent.log would be either “npm <version> was detected” or “npm was not found or failed, exitcode: <exit code>”.
Going down the docker path was not an option for us. Did the npm work using a command line task.