Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build stuck in the queue with "Please add Node.js NVM Installer build runner" #59

Open
cotsog opened this issue Oct 1, 2014 · 22 comments

Comments

@cotsog
Copy link

cotsog commented Oct 1, 2014

Hi,

I have a build configuration that doesn't need a "Node.js NVM Installer" step but yet it cannot run and I have the message stated in the title of this issue when I hover over the little bubble icon in the build queue.

Any idea why?

Thanks!

@jonnyzzz
Copy link
Owner

jonnyzzz commented Oct 5, 2014

The problem is that I need to allow any build configuration to run on a agent (in case NVM build feature is enabled) from the other hand I should not allow such configurations to run ( your case)

The problem is that TeamCity API does not let me to handle this via agent compatibility. So I have to extend it in the other way. I have some plans to re-work NVM integration at some moment. There is also a possibility the TeamCity API is updated to support the case I needed

@rogchap
Copy link

rogchap commented Mar 18, 2015

What is the resolution for this, as I have the same issue?

@jonnyzzz
Copy link
Owner

You should either select provided Node.js version or add the build feature
to the build
On Mar 18, 2015 5:09 AM, "Roger Chapman" notifications@github.com wrote:

What is the resolution for this, as I have the same issue?


Reply to this email directly or view it on GitHub
#59 (comment)
.

@gclem
Copy link

gclem commented Apr 20, 2015

Hi,

We are talking about a build step right ?
What do you mean by adding the build feature to the build ?

@jonnyzzz
Copy link
Owner

Check the build configuration setting menu. There is a item called 'Build
Features'. There you should be able to add the NVM build feature.
On Apr 20, 2015 10:05 AM, "Giovanni" notifications@github.com wrote:

Hi,

We are talking about a build step right ?
What do you mean by adding the build feature to the build ?


Reply to this email directly or view it on GitHub
#59 (comment)
.

@gclem
Copy link

gclem commented Apr 20, 2015

That's my problem, I haven't this feature.

Work arround : On a build, I have to add the build step type "NVM Installer", before use NPM.

@jonnyzzz
Copy link
Owner

please add the screenshot of build features you have
On Apr 20, 2015 10:14 AM, "Giovanni" notifications@github.com wrote:

That's my problem, I haven't this feature.


Reply to this email directly or view it on GitHub
#59 (comment)
.

@gclem
Copy link

gclem commented Apr 20, 2015

I resolved the problem, adding the build step type "Node.js NVM Installer", before the "Node.js NPM".

capture d ecran 2015-04-20 a 11 00 31

It was not so understandable on what I read from the short documentation attached.
And I haven't use build features on my build configuration to resolve the problem.

capture d ecran 2015-04-20 a 11 00 41

Thanks for your help

@jonnyzzz
Copy link
Owner

could you please include stuck queued build screenshot and message

are you using the latest build of the plugin?
On Apr 20, 2015 11:04 AM, "Giovanni" notifications@github.com wrote:

I resolved the problem, adding the build step type "Node.js NVM
Installer", before the "Node.js NPM".

[image: capture d ecran 2015-04-20 a 11 00 31]
https://cloud.githubusercontent.com/assets/2051121/7226878/bbf49aae-e74c-11e4-91b4-969eda04f445.png

It was not so understandable on what I read from the short documentation
attached.
And I haven't use build features on my build configuration to resolve the
problem.

[image: capture d ecran 2015-04-20 a 11 00 41]
https://cloud.githubusercontent.com/assets/2051121/7226882/cb6a65cc-e74c-11e4-9e11-829fd7317f87.png

Thanks for your help


Reply to this email directly or view it on GitHub
#59 (comment)
.

@nodje
Copy link

nodje commented Jun 10, 2015

I also have the problem, with latest Teamcity 9.0.4 and latest plugin version.
And I also can't find any related Build Feature.

I'm probably going to add Node.js NVM as a build step, but I'd like to understand why I don't have node in the Agent's PATH, which seems to be the reason why I can't get any Node.js NPM task working.

From the initial Node.js NVM installer:

[15:35:56][Use] ##teamcity[buildEnvironment name='NODE_PATH' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm/v0.12.4/lib/node_modules']
[15:35:56][Use] ##teamcity[buildEnvironment name='NVM_BIN' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm/v0.12.4/bin']
[15:35:56][Use] ##teamcity[buildEnvironment name='NVM_DIR' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm']
[15:35:56][Use] ##teamcity[buildEnvironment name='NVM_NODEJS_ORG_MIRROR' value='http://nodejs.org/dist']
[15:35:56][Use] ##teamcity[buildEnvironment name='NVM_PATH' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm/v0.12.4/lib/node']
[15:35:56][Use] ##teamcity[buildEnvironment name='PATH' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm/v0.12.4/bin:/usr/java/default/bin:[...]

So everything looks fine.
But when I log on the server with the Buildagent user and do echo $PATH it doesn't contain the node path.
If I add it manually on the server then I can call node and npm
But the agent still can't run the Node.js NPM build step.

@jonnyzzz
Copy link
Owner

The build feature is designed to install node and to add those missing
environment variables.

You should make sure node and npm commands are available in Path where you
ruin build agent. It looks you have installed node under another user that
one used to run build agent
On Jun 10, 2015 1:26 PM, "nodje" notifications@github.com wrote:

I also have the problem, with latest Teamcity 9.0.4 and latest plugin
version.
And I also can't find any related Build Feature.

I'm probably going to add Node.js NVM as a build step, but I'd like to
understand why I don't have node in the Agent's PATH, which seems to be
the reason why I can't get any Node.js NPM task working.

From the initial Node.js NVM installer:

[15:35:56][Use] ##teamcity[buildEnvironment name='NODE_PATH' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm/v0.12.4/lib/node_modules']
[15:35:56][Use] ##teamcity[buildEnvironment name='NVM_BIN' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm/v0.12.4/bin']
[15:35:56][Use] ##teamcity[buildEnvironment name='NVM_DIR' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm']
[15:35:56][Use] ##teamcity[buildEnvironment name='NVM_NODEJS_ORG_MIRROR' value='http://nodejs.org/dist']
[15:35:56][Use] ##teamcity[buildEnvironment name='NVM_PATH' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm/v0.12.4/lib/node']
[15:35:56][Use] ##teamcity[buildEnvironment name='PATH' value='/opt/TeamCity/buildAgent/system/jonnyzzz.nvm/v0.12.4/bin:/usr/java/default/bin:[...]

So everything looks fine.
But when I log on the server with the Buildagent user and do echo $PATH
it doesn't contain the node path.
If I add it manually on the server then I can call node and npm
But the agent still can't run the Node.js NPM build step.


Reply to this email directly or view it on GitHub
#59 (comment)
.

@nodje
Copy link

nodje commented Jun 11, 2015

I mean I could try to install everything manually for the buildAgent but I thought the Node.js NVM installer was just made for that.

I've just run the NVM installer then tried to run some NPM taks. It works if it is in the same run. But it's not persistent accross builds, and if I try to login with the buildAgent user on buildagent's machine I can find the downloaded artifacts but I can't use NPM or Node.

See https://gist.github.com/nodje/d4339e0f6cac35e21bf5 for a log of the process.

@jonnyzzz
Copy link
Owner

That is by design. We try to install node via NVM only for build so to
avoid altering of build agent environment in any way.

You should install node explicitly if you expect it to be shared between
builds
On Jun 11, 2015 11:06 AM, "nodje" notifications@github.com wrote:

I mean I could try to install everything manually for the buildAgent but I
thought the Node.js NVM installer was just made for that.

I've just run the NVM installer then tried to run some NPM taks. It works
if it is in the same run. But it's not persistent accross builds, and if I
try to login with the buildAgent user on buildagent's machine I can find
the downloaded artifacts but I can't use NPM or Node.

See https://gist.github.com/nodje/d4339e0f6cac35e21bf5 for a log of the
process.


Reply to this email directly or view it on GitHub
#59 (comment)
.

@dploeger
Copy link

This error affects MetaRunners as well:

I have a MetaRunner, that installs Node and NPM packages and offers this as a tool, which can be run via Node.

So, basically, Node IS installed, just not in the build configuration itself but through a MetaRunner.

Please remove this check there and do the check when running Node and fail, if no node is installed.

@rocketraman
Copy link

rocketraman commented Nov 21, 2017

Just a note to state this affects me as well on TeamCity 2017.10.1... I have nothing related to NodeJS or NVM in Build Features. However, adding node and npm into the build agent PATH does seem to solve the problem in the sense that it allows builds to run (though this requires pre-installing node and npm on the agent, whereas I thought one of the points of this plugin was to avoid having to pre-configure agents with node).

@jakehockey10
Copy link

NVM does not show up in my Build Features list. But this plugin is indeed installed on Server and propogating to build agents. If I add a step to install node via npm, my build agents become incompatible with the message node.js.nvm exists as the reason for incompatability

@jakehockey10
Copy link

This problem sucks!

@jonnyzzz
Copy link
Owner

jonnyzzz commented Aug 20, 2018 via email

@jakehockey10
Copy link

Not sure what the problem is. If I can find the time to do so, I will be glad to help. Sounds like our team is moving to vsts at an Enterprise level, however.

This plugin has helped us out quite a bit despite the recent hiccups we've experienced and I really appreciate all the work has went into it.

I apologize for the in appropriateness of my last comment

@urumican
Copy link

I don't have anything related to NVM or Node in the drop-down, either, when I try to add build feature. Would you show me something like a screenshot on how to edit it?

@tupoybot
Copy link

I resolved the problem, adding the build step type "Node.js NVM Installer", before the "Node.js NPM".

capture d ecran 2015-04-20 a 11 00 31

It was not so understandable on what I read from the short documentation attached.
And I haven't use build features on my build configuration to resolve the problem.

capture d ecran 2015-04-20 a 11 00 41

Thanks for your help

Your solution helped me

@tspence
Copy link

tspence commented Feb 3, 2023

In case anyone arrives at this thread and is stuck: I had a very curious problem which had me puzzled for a day.

I had installed NVM, but my build agent kept saying it wasn't installed.

The problem was that NVM installs by default as the current user, and my TeamCity build agent was configured to run as a different user!

Once I realized this, I could either install NVM on the correct user, or switch the teamcity build agent to run as the user that did have NVM set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests