In the getTargetPackageSpecFromNpmInstallOutput method, if the dependency or sub-dependency have a postinstall, for example electron package, it will print out extra lines:
Because of this additional print, the getTargetPackageSpecFromNpmInstallOutput method fails to parse properly the printout for the package name.
Appending the --silent flag would hide the addition printout and maintain the proper parsing. However, the --silent flag would prevent showing npm ERR! output on error. and they would be printed just in the .log file.
As a recommendation it would be better to loop through the printout and look for a particular format.
The steps above uses Nightly to test the Electron for Cordova 9 release.
Error:
Using cordova-fetch for github:apache/cordova-electron
Failed to fetch platform github:apache/cordova-electron
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Could not determine package name from output:
> electron@3.1.1 postinstall /cordova-procject/node_modules/electron
> node install.js
+ cordova-electron@1.0.0-dev
In the
getTargetPackageSpecFromNpmInstallOutput
method, if the dependency or sub-dependency have a postinstall, for example electron package, it will print out extra lines:Because of this additional print, the
getTargetPackageSpecFromNpmInstallOutput
method fails to parse properly the printout for the package name.Appending the
--silent
flag would hide the addition printout and maintain the proper parsing. However, the--silent
flag would prevent showing npm ERR! output on error. and they would be printed just in the .log file.As a recommendation it would be better to loop through the printout and look for a particular format.
The steps for reproduce:
The steps above uses Nightly to test the Electron for Cordova 9 release.
Error: