Open cotsog opened 10 years ago
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
What is the resolution for this, as I have the same issue?
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 https://github.com/jonnyzzz/TeamCity.Node/issues/59#issuecomment-82730741 .
Hi,
We are talking about a build step right ? What do you mean by adding the build feature to the build ?
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 https://github.com/jonnyzzz/TeamCity.Node/issues/59#issuecomment-94387480 .
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.
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 https://github.com/jonnyzzz/TeamCity.Node/issues/59#issuecomment-94388935 .
I resolved the problem, adding the build step type "Node.js NVM Installer", before the "Node.js NPM".
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.
Thanks for your help
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 https://github.com/jonnyzzz/TeamCity.Node/issues/59#issuecomment-94400131 .
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.
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 https://github.com/jonnyzzz/TeamCity.Node/issues/59#issuecomment-110687483 .
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.
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 https://github.com/jonnyzzz/TeamCity.Node/issues/59#issuecomment-111036221 .
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.
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).
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
This problem sucks!
Jake, please feel free to help us/ me and provide a PR with the fix. I’ll be happy to merge it
On Mon, 20 Aug 2018 at 20:14, Jake Smith notifications@github.com wrote:
This problem sucks!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jonnyzzz/TeamCity.Node/issues/59#issuecomment-414393471, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPpr1cbK3Yl5M-4655PvK2P6flW4wJiks5uSu52gaJpZM4CplYt .
-- Best regards, Eugene Petrenko https://jonnyzzz.com
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
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?
I resolved the problem, adding the build step type "Node.js NVM Installer", before the "Node.js NPM".
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.
Thanks for your help
Your solution helped me
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.
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!