简体   繁体   中英

Jenkins “Provide Node & npm bin/ folder to PATH” is empty

I've installed Jenkins, added my repo, also installed NodeJS Plugin. But in Build Environment > Provide Node & npm bin/ folder to PATH I have empty dropdown.

Image

(used https://strongloop.com/strongblog/roll-your-own-node-js-ci-server-with-jenkins-part-2/ tutorial) As result Jenkins crushes with

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 

So, what's wrong?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM