A common cause of failed Appflow builds relates to committing files or folders in a project that should be generated as part of the Appflow build process.
Project repos committed to Ionic Appflow should never include the node_modules/
, the Cordova platforms/
, or plugins/
directories. The www/
directory should only be included if the project type is ionic1
.
A default .gitignore
file is included in new projects. If a project's .gitignore
file is absent or has been modified it must be restored.
To restore the default .gitignore
file:
- Retrieve the appropriate
.gitignore
file from Github, depending on your project type:angular
(v4+): https://github.com/ionic-team/starters/blob/master/angular/base/.gitignorereact
(v4+): https://github.com/ionic-team/starters/blob/main/react/base/.gitignorevue
(v5+): https://github.com/ionic-team/starters/blob/main/vue/base/.gitignoreionic-angular
(v3): https://github.com/ionic-team/starters/blob/master/ionic-angular/base/.gitignoreionic1
: https://github.com/ionic-team/starters/blob/master/ionic1/base/.gitignore
- Copy the file to the root of your project repo
- Run the following commands:
git rm -r --cached . git add . git commit -m 'restoring gitignore' git push <your remote> <your branch>
After restoring the .gitignore attempt to build in Appflow using the new commit.
Comments
0 comments
Article is closed for comments.