Note: This step is skipped for Ionic 1 apps. They do not require a build, since the www/ directory is directly committed.

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 Ionic Pro.

How to troubleshoot

Nuke your node modules

Since the most likely issue is a discrepancy between your local project and what you've committed, the best way to troubleshoot is to sync those two environments by following these steps:

1. Delete the app's node_modules/​ directory

2. Delete the app's package-lock.json​ file

3. Run npm install​ (which will regenerate what you deleted above)

4. Run npm run build​

Most likely, you will then see the same error you saw in the build log on your Ionic Pro dashboard. The error messages should point you in the right direction of what needs to be updated.

Note also that packages have their own dependencies. Frequently, an app installs one version of a package, then another dependency tries to install another version, and the collision between the two causes an error.

Once you have updated your dependencies, repeat the steps above. Once the build succeeds locally, re-commit and push to Ionic, and the build should work on our platform as well.