Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins are not copied to platforms folders after delete repo, clone it again and build platforms #555

Open
sylvestrevgen opened this issue Apr 21, 2021 · 5 comments

Comments

@sylvestrevgen
Copy link

Bug Report

Problem

Plugins are not copied to platforms folders after delete repo, clone it again and build platforms

What is expected to happen?

Plugins is succesfully installed and worked in both platforms (Android and iOS). After delete repo locally and clone it again, plugins are successfully copied to platforms/ios and platforms/android.

What does actually happen?

After delete repo locally and clone it again, plugins are not copied to platforms folders. To fix this bug, I need to remove both platforms and add it again. After this, plugins are copied and works fine.

Information

Command or Code

Delete cordova app project, clone it again, install node modules, run cordova ios or android.

Environment, Platform, Device

iOS, Android

Version information

cordova CLI 10, cordova-android 9.1.0, cordova-ios 6.2.0

Checklist

  • [x ] I searched for existing GitHub issues
  • [ x] I updated all Cordova tooling to most recent version
  • [x ] I included all the necessary information above
@breautek
Copy link
Contributor

After delete repo locally and clone it again, plugins are not copied to platforms folders. To fix this bug, I need to remove both platforms and add it again. After this, plugins are copied and works fine.

Has Cordova ever installed the platform for you before? Using cordova platform add ... for the platform you intend to buiild. This was something a requirement for as long as I remember...

@sylvestrevgen
Copy link
Author

Yes, all platforms has been installed before. After delete repo and clone it again, everything is fine but plugins folder is not defined in platforms/ios and platforms/android.

@sylvestrevgen
Copy link
Author

Is there anything about this bug? Or it is not a bug and we need restart platforms everytime when clone repo on another laptop?

@breautek
Copy link
Contributor

For a team setup it's recommended to git ignore the following folders:

  • node_modules
  • plugins
  • platforms

When you clone the repo, the developer should:

  • npm install
  • cordova platform add

This way your project can be supported on different environments, for example you cannot work on an ios platform on windows/linux. It also makes sures that when npm install is used (behind the scenes), any native modules are installed for your specific environment.

I don't think this is a bug. Let me know what you think though. And if your flow worked before, can you give what cordova version it worked in?

@sylvestrevgen
Copy link
Author

I am not sure about it worked before. I am going to try your advice. Thank you for quick answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants