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

Node.js NVM Installer fails to select Node Version #190

Open
peter9teufel opened this issue Mar 29, 2024 · 8 comments
Open

Node.js NVM Installer fails to select Node Version #190

peter9teufel opened this issue Mar 29, 2024 · 8 comments

Comments

@peter9teufel
Copy link

Latest TeamCity version, plugin version teamcity-node-2.0.27

The build step to install and select a specific node version (version 14 required in our case) fails.

06:18:22  Step 1/3: NVM 14 Install (Node.js NVM Installer) 06:18:22  Download: Fetching NVM 06:18:22  Downloading nvm-sh/nvm... 06:18:22  from https://github.com/nvm-sh/nvm/archive/v0.39.2.zip 06:18:23  NVM downloaded into /opt/JetBrains/TeamCity/buildAgent/system/jonnyzzz.nvm 06:18:23  Install: Installing Node.js v14.21.3 06:18:23  Starting: /opt/JetBrains/TeamCity/buildAgent/temp/agentTmp/custom_script5004199583965402415 06:18:23  in directory: /opt/JetBrains/TeamCity/buildAgent/system/jonnyzzz.nvm 06:18:24  Downloading and installing node v14.21.3... 06:18:25  Downloading https://nodejs.org/dist/v14.21.3/node-v14.21.3-linux-x64.tar.xz... 06:18:25  06:18:25  ######### 13,2% 06:18:25  ################################################## 70,4% 06:18:25  ######################################################################## 100,0% 06:18:25  Computing checksum with sha256sum 06:18:25  Checksums matched! 06:18:29  Now using node v14.21.3 (npm v6.14.18) 06:18:29  Creating default alias: default -> 14.21.3 (-> v14.21.3 *) 06:18:29  Process exited with code 0 06:18:29  Use: Selecting Node.js v14.21.3 06:18:29  Starting: /opt/JetBrains/TeamCity/buildAgent/temp/agentTmp/custom_script7487676735048777800 06:18:29  in directory: /opt/JetBrains/TeamCity/buildAgent/system/jonnyzzz.nvm 06:18:30  Now using node v14.21.3 (npm v6.14.18) 06:18:30  Error: Invalid or corrupt jarfile /opt/JetBrains/TeamCity/buildAgent/plugins/environment-fetcher/lib/environment-fetcher-bin-2024.03-156166-jar-with-dependencies.jar 06:18:30  Process exited with code 1 06:18:30  Process exited with code 1 (Step: ) 06:18:31  Step NVM 14 Install (Node.js NVM Installer) failed

This currently blocks us from building a frontend for our project that requires a different node version, thanks for taking a look into it.

Best regards,
Peter

@inekrashevych-callfire
Copy link

same for me. also opened a bug for teamcity youtrack. seems like disabling the environment-fetcher plugin eliminates the error, but not sure it is a good idea to disable the bundled plugin.

@eumpek
Copy link

eumpek commented Apr 2, 2024

We are facing the same issue after updating to TC 2024.03 and Node.js build rinner to 2.0.27.

@benhart
Copy link

benhart commented Apr 5, 2024

ICYMI the bug @inekrashevych-callfire opened on youtrack has a new environment-fetcher plugin that can be downloaded and patched on TC. This has resolved the issue for us.

@simongh
Copy link

simongh commented Apr 8, 2024

Neither the new plugin nor disabling environment fetcher worked for me.

I still get

ERROR - gins.spring.SpringPluginLoader - Error loading plugin 'teamcity-node-agent-2.0.26': Failed to initialize spring context: Error creating bean with name 'com.jonnyzzz.teamcity.plugins.node.agent.nvm.NVMRunner#0' defined in Byte array resource [plugin: teamcity-node-agent-2.0.26#teamcity-node-agent-2.0.26.jar!/META-INF/build-agent-plugin-node.xml]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.jonnyzzz.teamcity.plugins.node.agent.processes.CompositeProcessFactoryImpl#0': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.jonnyzzz.teamcity.plugins.node.agent.processes.CompositeProcessFactoryImpl] from ClassLoader [PluginStandaloneClassLoader{plugin=teamcity-node-agent-2.0.26 parent=java.net.URLClassLoader@37a71e93}] 

I'm going to have to try adding a manual script to run the node steps directly & hope that works

@inekrashevych-callfire
Copy link

2.0.27 is the right version to install. You have wrong version.

@apps4everyone
Copy link

@inekrashevych-callfire we installed the version 2.0.27 but getting this error:
Error: Invalid or corrupt jarfile /opt/buildagent/plugins/environment-fetcher/lib/environment-fetcher-bin-2024.03-156166-jar-with-dependencies.jar
What java version is required? do those still work with java 11?

@apps4everyone
Copy link

@kir
Copy link
Contributor

kir commented Apr 17, 2024

Hi, the problem with environment-fetcher is a newly introduced bug, should be fixed with this issue - https://youtrack.jetbrains.com/issue/TW-87170/teamcity-process-environment-fetcher-plugin-corrupted-jar-reported-by-TeamCity.Node-plugin , please also see the comments there.

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

7 participants