apache / cordova-plugin-statusbar

Apache Cordova Status Bar Plugin
https://cordova.apache.org/
Apache License 2.0
617 stars 480 forks source link

Failed to fetch plugin cordova-plugin-statusbar@cordova-plugin-statusbar via registry. #211

Closed ghost closed 3 years ago

ghost commented 3 years ago

When i try to add the plugin this happens:

Ubuntu 20.10 Cordova 10.0.0

cordova plugin add cordova-plugin-statusbar
Failed to fetch plugin cordova-plugin-statusbar@cordova-plugin-statusbar via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for cordova-plugin-statusbar@cordova-plugin-statusbar.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git
Failed to fetch plugin https://github.com/apache/cordova-plugin-statusbar.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: CordovaError: Could not determine package name from output:
up to date, audited 90 packages in 6s

7 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Does not seem to be a connection problem on my site. What else could cause this?

breautek commented 3 years ago

Are you using npm 7?

ghost commented 3 years ago

Yes, 7.4.3. I do not find anywhere what the current version of npm is. Of course, why would they put such vital information on the npm homepage.

breautek commented 3 years ago

Try reinstalling Cordova: e.g:

npm uninstall cordova -g
npm install cordova -g

A subdependency of cordova was published a few hours ago. So by reinstalling cordova should make npm fetch that update, which includes fixes for NPM 7.

ghost commented 3 years ago

Yes, apt-get dist-upgrade made nodesource update npm to 7.5.1 I did reinstall cordova, like you suggested, and now it works. Thank you very much!