shankari edited a comment on issue #87:
URL: https://github.com/apache/cordova-fetch/issues/87#issuecomment-657975967
`Could not determine package name from output` is from
`node_modules//cordova-fetch/index.js`
<details>
<summary>Code</summary>
```
function getTargetPackageSpecFromNpmInstallOutput (npmInstallOutput) {
const lines = npmInstallOutput.split('\n');
for (let i = 0; i < lines.length; i++) {
if (lines[i].startsWith('+ ')) {
// npm >= 5
return lines[i].slice(2);
} else if (lines[i].startsWith('└─') || lines[i].startsWith('`-')) {
// 3 <= npm <= 4
return lines[i].slice(4).split(' ')[0];
}
}
throw new CordovaError('Could not determine package name from output:\n'
+ npmInstallOutput);
}
```
</details>
Essentially, the code expects the npm install output to have a `+`, but it
doesn't. The output is just `[email protected]
node_modules/phonegap-plugin-contentsync` with no `+`, which is why this fails.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]