Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-42775

NodeJS Plugin - Unresolvable nodeJS installer for version in Windows i386

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • nodejs-plugin
    • Jenkins ver. 2.32.3
      NodeJS Plugin ver. 1.1.2

      Using the "Install automatically" feature of the plugin in a x86 Windows environment triggers the error:

      FATAL: Unresolvable nodeJS installer for version=7.7.2, cpu=i386, platform=WINDOWS
       java.lang.IllegalArgumentException: Unresolvable nodeJS installer for version=7.7.2, cpu=i386, platform=WINDOWS
       at jenkins.plugins.nodejs.tools.pathresolvers.LatestInstallerPathResolver.resolvePathFor(LatestInstallerPathResolver.java:63)
       at jenkins.plugins.nodejs.tools.NodeJSInstaller.getInstallable(NodeJSInstaller.java:110)
       at jenkins.plugins.nodejs.tools.NodeJSInstaller.performInstallation(NodeJSInstaller.java:125)
       at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
       at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
       at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
       at jenkins.plugins.nodejs.tools.NodeJSInstallation.forNode(NodeJSInstallation.java:94)
       at jenkins.plugins.nodejs.NodeJSBuildWrapper.setUp(NodeJSBuildWrapper.java:110)
       at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:145)
       at hudson.model.Build$BuildExecution.doRun(Build.java:156)
       at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
       at hudson.model.Run.execute(Run.java:1728)
       at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
       at hudson.model.ResourceController.execute(ResourceController.java:98)
       at hudson.model.Executor.run(Executor.java:404)
      

      In the plugin code, more specifically in the "LatestInstallerPathResolver.java" file:

      switch (cpu) \{
       case i386:
       if (NodeJSVersion.parseVersion(version).compareTo(new NodeJSVersion(4, 0, 0)) >= 0) \{
       throw new IllegalArgumentException("Unresolvable nodeJS installer for version=" + version + ", cpu=" + cpu.name() + ", platform=" + platform.name());
       }
       arch = "x86";
       break;
      

      Reading the code, if the NodeJS version is greater then 4.0.0, the plugin throws a error, so x86 users only can use Node on versions 0.X.X.

            nfalco Nikolas Falco
            filipduarte Filip dos Santos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: