Cannot run ionic deploy manifest outside a project directory

Hello,
I have a mono repo with two apps, one that contains all the configurations for native builds and one with the angular PWA app. In order to build my native app I need to build my PWA app first then copy the www folder in the other project’s www.

Project 1 → root/pyxis
Project 2 → root/Mobile

I set up my appflow.config.json like:

{
  "apps":
  [
      {
          "appId": "12345abcd",
          "root": "pyxis",
          "dependencyInstallCommand": "npm ci && cd ../Mobile && npm ci && cd ../pyxis",
          "webBuildCommand": "cd ../Mobile && npm run build:dev && cp -v -R www ../pyxis/www && cd ../pyxis"
      }
  ]
}

Everything builds properly but I still have an issue I don’t understand.
Cannot run ionic deploy manifest outside a project directory
My script brings me back the the project folder I’m targeting which is root/pyxis
The www folder in root/Mobile is copied to root/pyxis

If my understanding is good, I don’t need yet Appflow SDK since all I want to do first is to build my native app with Appflow runners. I didn’t changed anything to my two projects. Do I need an important configuration?

here is the log:

[14:22:47]: ▸ 'www/index.html' -> '../pyxis/www/index.html'
[14:22:47]: Generating app manifest...
[14:22:47]: $ ionic deploy manifest
[14:22:48]: ▸ [ERROR] Cannot run ionic deploy manifest outside a project directory.
[14:22:48]: -------------------------
[14:22:48]: --- Step: upload_logs ---
[14:22:48]: -------------------------
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
|                                                                            Lane Context                                                                            |
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM             | ios                                                                                                                                 |
| PLATFORM_NAME                | android                                                                                                                             |
| LANE_NAME                    | android package_build                                                                                                               |
| APPFLOW_CONFIG_INSTALL_CMD   | npm ci && cd ../Mobile && npm ci && cd ../pyxis                                                                                     |
| APPFLOW_CONFIG_WEB_BUILD_CMD | cd ../Mobile && npm run build:dev && cp -v -R www ../pyxis/www && cd ../pyxis |
| PROJECT_WEB_DIR              | www                                                                                                                                 |
| DOWNLOAD_CREDENTIAL_EXISTS   | false                                                                                                                               |
+------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
[14:22:50]: Exit status of command 'ionic deploy manifest' was 1 instead of 0.
[ERROR] Cannot run ionic deploy manifest outside a project directory.


+------+---------------------+-------------+
|             fastlane summary             |
+------+---------------------+-------------+
| Step | Action              | Time (in s) |
+------+---------------------+-------------+
| 1    | default_platform    | 0           |
| 2    | build_summary       | 0           |
| 3    | add_git_credentials | 0           |
| 4    | get_appflow_config  | 0           |
| 5    | detect_native_type  | 0           |
| 6    | dependency_install  | 485         |
| 7    | get_web_dir         | 0           |
| 8    | modify_config_xml   | 0           |
| 9    | download_credential | 0           |
| 💥   | build_pro_app       | 579         |
| 11   | upload_logs         | 2           |
+------+---------------------+-------------+

[14:22:50]: fastlane finished with errors

I ended up fixing it. It seems like I need an ionic.config.json file at the root/pyxis.

Apologies for the rough experience. We have this on our radar to make more friendly in the CLI and the docs. Thanks.

1 Like

I think your documentation is fine, I didn’t dig enough :slight_smile:

1 Like