Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-79984

Node Gradle Plugin: npm and npx executables are 0 bytes

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 7.0.0 DXP FP43
    • Fix Version/s: None
    • Labels:
    • Fix Priority:
      2

      Description

      When the Node Gradle Plugin is called because of the presence of a package.json install inside an OSGi Bundle, the npm and npx executables are not runnable because inside ${LIFERAY_WORKSPACE}/build/node/bin/ only node has an executable of 35MB, npm and npx are of 0 bytes.

      They're not symbolic links to the real executables inside ${LIFERAY_WORKSPACE}/build/node/lib/node_modules/npm/bin/npm-cli.js | npx-cli.js as they are in a normal node environment.

      As consequence, if I call npm inside my package.json file (i.e. inside a postinstall run), it does not work because during build the executable is not found.

      I have the following settings.gradle, which I guess uses the latest Node Gradle Plugin (with node version 8.4.0):

      buildscript {
        dependencies {
          classpath group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "1.7.1"
          classpath group: "net.saliman", name: "gradle-properties-plugin", version: "1.4.6"
      }
      
      repositories {
        maven {
          url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"
          }
        }
      }
      
      apply plugin: "net.saliman.properties"
      apply plugin: "com.liferay.workspace"
      

       

      Related forum issue link.

      Related github issue of a node package affected by this problem.

       

       

       

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              caneta Alessandro
              Participants of an Issue:
              Recent user:
              Sherry Zhu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                1 year, 29 weeks, 2 days ago

                Packages

                Version Package