apache / cordova-fetch

Apache Cordova Fetch Library
https://cordova.apache.org/
Apache License 2.0
27 stars 27 forks source link

CordovaError: Could not determine package name from output #67

Closed markarupert closed 5 years ago

markarupert commented 5 years ago

Bug Report

Problem

When I attempt to install a plugin I get an error.

These are all steps I have done successfully in the past.

What is expected to happen?

Successful installation of the plugin

What does actually happen?

$ cordova plugin add ../cordova-background-geolocation { CordovaError: Could not determine package name from output: up to date in 10.929s at getTargetPackageSpecFromNpmInstallOutput (/usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/index.js:104:11) at processTicksAndRejections (internal/process/next_tick.js:81:5) name: 'CordovaError', message: 'Could not determine package name from output:\nup to date in 10.929s', code: 0, context: undefined }

Information

Command or Code

Environment, Platform, Device

Mac 10.14.4

Version information

Device manufacturer / model: Cordova version (cordova -v): 9.0.0 (cordova-lib@9.0.1) Cordova platform version (cordova platform ls): android ^8.0.0 browser ^6.0.0 electron ^1.0.0 osx ^5.0.0 windows ^7.0.0

Checklist

breautek commented 5 years ago

Does it work if you prefix your filepath with file: like below?

cordova plugin add file:../cordova-background-geolocation

markarupert commented 5 years ago

I ended up wiping the platform and reloading all of the plugins and the ghost problem went away.

Thanks.

HarshitChhipa commented 4 years ago

JUST for knowledge, This occurs when there is a mismatch of the plugins name try to update or sync the plugin's name from package.json file.

wayneburkett commented 4 years ago

JUST for knowledge, This occurs when there is a mismatch of the plugins name try to update or sync the plugin's name from package.json file.

Mismatch where? What two (or more) things are you referring to here that could be mismatched?

ifredom commented 3 years ago

How to solve this problem

yogskumar commented 3 years ago

hi @ifredom just use below command

1) npm uninstall -g cordova 2) npm install -g cordova

and let me know if you have any issue

smallscript commented 3 years ago

Uninstall and reinstall fixed my problem of this same kind.

fattoliu commented 3 years ago

JUST for knowledge, This occurs when there is a mismatch of the plugins name try to update or sync the plugin's name from package.json file.

thanks!

Wynand101 commented 1 year ago

I did a mixture of all the above comments with some additions: