Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10430

cordova-common events don't reach platform's code

    XMLWordPrintableJSON

Details

    Description

      I was looking to get verbose output of cordova-windows to see what external commands it is running on my behalf. I was hoping the APIfication with use of superspawn will help here. However, that does not seem to be the case – even though the code seems to suggest that.

      exports.spawn = function(cmd, args, opts) {
      ..
          events.emit(opts.printCommand ? 'log' : 'verbose', 'Running command: ' + maybeQuote(cmd) + ' ' + args.map(maybeQuote).join(' '));
      ..
      }
      
      λ cordova build windows --verbose -- --appx=uap --verbose
      Executing "before_build"  hook for all plugins.
      Executing "before_prepare"  hook for all plugins.
      Searching PlatformJson files for differences between project vs. platform installed plugins
      No differences found between project and windows platform. Continuing...
      Generating config.xml from defaults for platform "windows"
      Updated project successfully
      Executing "after_prepare"  hook for all plugins.
      Executing "before_compile"  hook for all plugins.
      Searching for available MSBuild versions...
      Found MSBuild v14.0 at C:\Program Files (x86)\MSBuild\14.0\bin
      Found MSBuild v12.0 at C:\Program Files (x86)\MSBuild\12.0\bin\amd64\
      Found MSBuild v4.0 at C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
      Building project: d:\apps\app\platforms\windows\CordovaApp.Windows10.jsproj
              Configuration : debug
              Platform      : anycpu
      C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets(181,5): error : Couldn't find the required  information in the lock file. Make sure you have .NETCore,Version=v5.0/win10-anycpu mentioned in your targets. [ d:\apps\app\platforms\windows\CordovaApp.Windows10.jsproj]
      ERROR building one of the platforms: Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
      You may not have the required environment or OS to build this project
      Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
          at ChildProcess.whenDone (d:\apps\app\platforms\windows\cordova\node_modules\cordova-common\src\superspawn.js:139:23)
          at emitTwo (events.js:87:13)
          at ChildProcess.emit (events.js:172:7)
          at maybeClose (internal/child_process.js:817:16)
          at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
      

      As you can see there is no “Running command …”

      Attachments

        Activity

          People

            vladimir.kotikov Vladimir Kotikov
            vladimir.kotikov Vladimir Kotikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: