Red-Folder / bgs-core

Core code for the Cordova Background Service
Other
236 stars 104 forks source link

bgs-core.git Error: Failed to fetch plugin https://github.com/Red-Folder/bgs-core.git via registry #79

Closed shamun closed 7 years ago

shamun commented 7 years ago

Hello, failing to add.

$ cordova plugin add https://github.com/Red-Folder/bgs-core.git
Error: Failed to fetch plugin https://github.com/Red-Folder/bgs-core.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 235 Error output:
npm ERR! addLocal Could not install /var/folders/zq/zqbl2b1x43g6kq5bxmgx39880000gn/T/npm-19057-55d95a3f/git-cache-432cf23f/f37a2ae0fa9cfaecea391115809baf8cb098c23a
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "https://github.com/Red-Folder/bgs-core.git" "--save"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/sun/Desktop/iphone_android/tptalert/node_modules/npm-debug.log
shamun commented 7 years ago

Same with bgs-sample.git too

$ cordova plugin add https://github.com/Red-Folder/bgs-sample.git
Error: Failed to fetch plugin https://github.com/Red-Folder/bgs-sample.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 235 Error output:
npm ERR! addLocal Could not install /var/folders/zq/zqbl2b1x43g6kq5bxmgx39880000gn/T/npm-19137-dc1531fc/git-cache-e4ac5546/0d2ae254180b3f4bce860bfb1b090be0dd5b2341
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "https://github.com/Red-Folder/bgs-sample.git" "--save"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/sun/Desktop/iphone_android/tptalert/node_modules/npm-debug.log
shamun commented 7 years ago

Same problem.

$ cordova create hello com.example.hello "HelloWorld"
$ cd hello/

$ cordova platform add android
Using cordova-fetch for cordova-android@~6.2.2
Adding android project...
Creating Cordova project for the Android platform:
    Path: platforms/android
    Package: com.example.hello
    Name: HelloWorld
    Activity: MainActivity
    Android target: android-25
Subproject Path: CordovaLib
Android project created with cordova-android@6.2.3
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
--save flag or autosave detected
Saving android@~6.2.3 into config.xml file ...

$ cordova plugin add https://github.com/Red-Folder/bgs-sample.git
Error: Failed to fetch plugin https://github.com/Red-Folder/bgs-sample.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 235 Error output:
npm ERR! addLocal Could not install /var/folders/zq/zqbl2b1x43g6kq5bxmgx39880000gn/T/npm-19213-d41cffa7/git-cache-5ff5d98d/0d2ae254180b3f4bce860bfb1b090be0dd5b2341
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "https://github.com/Red-Folder/bgs-sample.git" "--save"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/sun/Desktop/iphone_android/hello/node_modules/npm-debug.log
Red-Folder commented 7 years ago

What version of Cordova and NPM?

shamun commented 7 years ago
$ cordova --version
7.0.1
$ npm --version
3.10.10
Red-Folder commented 7 years ago

@shamun try that. I've had a pull request pending which fixes it for bgs-core. I've also applied to bgs-sample (bit of a hack, but not fully tested by any means)