2016-08-23 25 views
0

我安裝了Jenkins,添加了我的repo,還安裝了NodeJS插件。 但是在構建環境>提供節點& npm bin /文件夾到路徑 我有空的下拉菜單。Jenkins「提供節點和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 

那麼擊碎,有什麼不對?

回答

6

您可以在「管理Jenkins」 - >「全局工具配置」 - >「添加NodeJS」下指定一個新的節點安裝。

+0

謝謝!對不起,但我沒有足夠的聲望投票。 – Vlad

+1

沒問題!正如一個側面說明,一個你可以得到一個小聲望提升的方式是接受你提出的問題的答案。根據[這個答案],我認爲這是加2(http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work)。如果您有8個問題可以標記爲接受,您將在[15]聲望[獲得投票權](http://stackoverflow.com/help/privileges/vote-up)! –