Details

    • Branch Version/s:
      7.0.x
    • Backported to Branch:
      Committed

      Description

      If I configure my Gradle properties to not download Node.js from the network with nodeDownload=false it will fail with this stacktrace:

      org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':modules:my-bundle:npmInstall'.
              at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
              ... 57 more
      Caused by: java.lang.NullPointerException
              at com.liferay.gradle.util.FileUtil.isChild(FileUtil.java:188)
              at com.liferay.gradle.plugins.node.tasks.ExecuteNpmTask.executeNode(ExecuteNpmTask.java:87)
              at com.liferay.gradle.plugins.node.tasks.NpmInstallTask._npmInstall(NpmInstallTask.java:333)
              at com.liferay.gradle.plugins.node.tasks.NpmInstallTask.executeNpmInstall(NpmInstallTask.java:206)
              at com.liferay.gradle.plugins.node.tasks.NpmInstallTask.executeNode(NpmInstallTask.java:96)
              at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
              ... 64 more
      

      The issue lies in the access to cacheDir on this line but as documentation says cacheDir is null when nodeDir is null, which happens with nodeDownload set to false (see this section).

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 7 weeks ago

                Packages

                Version Package
                7.0.X EE