The Basics
What happens when you push?
When you push a new commit for a repo integrated with Appflow, our platform adds the commit to your Commits page.
From there, you can choose to run a new build at your convenience (or automate the process using Automations if supported by your plan type).
The following steps are run during a build:
1. npm install
, which will pull in all of your app's node dependencies from the NPM registry.
2. npm run build
, which will execute whatever build script is specified in the scripts
field in your app's package.json.
Why do they fail?
The most important point to keep in mind about these builds is the package.json file is the only source of truth for your app's node dependencies. Most often, when a build fails, it is because some package is missing from from the version of package.json that has been pushed to Appflow.
Some helpful tools for troubleshooting
$ ionic doctor check
: to check on the health of your Ionic project$ npm list
: to list your npm packages, and any errors and warnings$ npm outdated
: see what packages are out of date
Some best practices
- Always include the
--save
flag when adding plugins and platforms - Get very familiar with NPM and semver
Comments
0 comments
Article is closed for comments.