question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't restore plugins after cloning project from repo

See original GitHub issue

Hi, I’m having problems to restore my plugins from a private project in github after updating from cordova 6.5 to 8.1.2. Basically I have a .gitignore for the folders plugins/ and platforms/ as they are generated and contain duplicated data. I’ve used in that way till now without issues. I had to upgrade my project, now I can’t use this approach anymore. When I try to restore the project I get errors like the one below.

I tried to downgrade and use a previous version of cordova, like 7, but still not working.

I’m using ionic here, but I can get same error when I try directly with cordova commands.

Another note is that this is not happening with plugins in npm public repo, the ones I add with a name, just with the ones I have to add with a git url.

Thanks

Error: Discovered plugin “cordova-plugin-telerik-imagepicker” in config.xml. Adding it to the project Failed to restore plugin “cordova-plugin-telerik-imagepicker” from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/Telerik-Verified-Plugins/ImagePicker.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module

How to reproduce:

ionic version: 4.10.2
cordova version: 8.1.2

These steps are used to create a project from the scratch

ionic start ionic-issue-dependencies blank --type=ionic-angular
cd ionic-issue-dependencies
ionic cordova platform add android
ionic cordova plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker.git

This would be done before saving to github (actually done via .gitignore)

rm -rf plugins
rm -rf platforms
rm -rf node_modules

This is normally done after a fresh clone of the repo

npm install
ionic cordova platform add android

Logs:

$ ionic cordova platform add android
> cordova platform add android --save
Using cordova-fetch for cordova-android@7.1.4
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: io.ionic.starter
	Name: MyApp
	Activity: MainActivity
	Android target: android-27
Android project created with cordova-android@7.1.4
Android Studio project detected
Android Studio project detected
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
Discovered plugin "cordova-plugin-statusbar" in config.xml. Adding it to the project
Installing "cordova-plugin-statusbar" for android
Adding cordova-plugin-statusbar to package.json
Saved plugin info for "cordova-plugin-statusbar" to config.xml
Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the project
Installing "cordova-plugin-device" for android
Adding cordova-plugin-device to package.json
Saved plugin info for "cordova-plugin-device" to config.xml
Discovered plugin "cordova-plugin-splashscreen" in config.xml. Adding it to the project
Installing "cordova-plugin-splashscreen" for android
Adding cordova-plugin-splashscreen to package.json
Saved plugin info for "cordova-plugin-splashscreen" to config.xml
Discovered plugin "cordova-plugin-ionic-webview" in config.xml. Adding it to the project
Installing "cordova-plugin-ionic-webview" for android
Subproject Path: CordovaLib
Subproject Path: app
Adding cordova-plugin-ionic-webview to package.json
Saved plugin info for "cordova-plugin-ionic-webview" to config.xml
Discovered plugin "cordova-plugin-ionic-keyboard" in config.xml. Adding it to the project
Installing "cordova-plugin-ionic-keyboard" for android
Adding cordova-plugin-ionic-keyboard to package.json
Saved plugin info for "cordova-plugin-ionic-keyboard" to config.xml
Discovered plugin "cordova-plugin-telerik-imagepicker" in config.xml. Adding it to the project
Failed to restore plugin "cordova-plugin-telerik-imagepicker" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/Telerik-Verified-Plugins/ImagePicker.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module
--save flag or autosave detected
Saving android@~7.1.4 into config.xml file ...
[ERROR] An error occurred while running subprocess cordova.

        
        cordova platform add android --save exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

0reactions
rajohns08commented, Dec 22, 2021

I saw this issue, but it started working for me after I downgraded to node 14.18.2?

Read more comments on GitHub >

github_iconTop Results From Across the Web

how see files of project after cloning git repository with eclipse?
It doesn't matter how you clone the Git repository: you can do it manually (from Git), or you can use Eclipse's Git plugin....
Read more >
Fix Git's 'fatal: repository not found' error quickly | TheServerSide
Frustrated by Git's 'fatal: repository not found' error message? Here are five ways to fix that problem and successfully clone, ...
Read more >
git - Can't clone remote repository - Visual Studio Feedback
I found a workaround. It turns out that for some (but not all) installations the RC installer is installing a prerelease version of...
Read more >
Can't connect cloned repo to sandbox in VS Code
Your project is missing a bunch of critical files. Fortunately, this is super-easy to fix. Starting from the cloned folder, ...
Read more >
how to reinstall umbraco after cloning repository
Send the new developer a backup of the database to restore locally once they've cloned the source code (and ongoing devs will need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found