Jenkins“向PATH提供Node& npm bin /文件夹”为空

时间:2016-08-23 16:21:01

标签: node.js linux jenkins continuous-integration

我安装了Jenkins,添加了我的repo,还安装了NodeJS插件。 但是在构建环境中>提供Node& npm bin /文件夹到PATH 我有空的下拉列表。

Image

(使用https://strongloop.com/strongblog/roll-your-own-node-js-ci-server-with-jenkins-part-2/教程) 结果詹金斯粉碎了

ERROR: Build step failed with exception
java.lang.IllegalArgumentException: NodeJS Installation not found : 
    at jenkins.plugins.nodejs.NodeJSPlugin.findInstallationByName(NodeJSPlugin.java:42)
    at jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper$2.launch(NpmPackagesBuildWrapper.java:64)
    at hudson.Launcher$ProcStarter.start(Launcher.java:381)
    at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95)
    at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.Build$BuildExecution.build(Build.java:205)
    at hudson.model.Build$BuildExecution.doRun(Build.java:162)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
    at hudson.model.Run.execute(Run.java:1720)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:404)
Build step 'Execute shell' marked build as failure
Finished: FAILURE 

那么,出了什么问题?

1 个答案:

答案 0 :(得分:9)

您可以在“管理Jenkins”下指定新的节点安装 - > “全局工具配置” - > “添加NodeJS”。