Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70894

Get Appflow working with Nx monorepo based App repository

$
0
0

I’m attempting to get an app to build in Appflow, but without success. The app lives in an Nx Monorepo, therefore I’ve added the following appflow.config.json:

{
  "apps":
  [
      {
          "appId": "xxxxxxxx",
          "root": "apps/airsmart-user",
          "dependencyInstallCommand": "## yarn install && cd ../../ && yarn install",
          "webBuildCommand": "## cd ../../ && yarn nx build airsmart-user"
      }
  ]
}

with the correct appId. I’ve commented out the dependency and web build commands above. They caused the build to crash at that line when left in. Here’s that log results:

[05:46:35]: Installing Dependencies (in /builds/monkeytronics/air-smart/apps/airsmart-user)
[05:46:35]: $ yarn install && cd ../../ && yarn install
[05:46:35]: ▸ ➤ YN0000: · Yarn 4.0.1
[05:46:36]: ▸ ➤ YN0000: ┌ Resolution step
[05:46:36]: ▸ ➤ YN0001: │ Error: @capacitor/android@file:../../node_modules/@capacitor/android::locator=airsmart-user%40workspace%3A.: ENOENT: no such file or directory, lstat '/builds/monkeytronics/air-smart/node_modules/@capacitor/android'
[05:46:36]: ▸ ➤ YN0000: └ Completed
[05:46:36]: ▸ ➤ YN0000: · Failed with errors in 0s 82ms
[05:46:36]: Failed to install dependencies using custom command: 'yarn install && cd ../../ && yarn install'
 Shell command exited with exit status 1 instead of 0.
➤ YN0000: · Yarn 4.0.1
➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: @capacitor/android@file:../../node_modules/@capacitor/android::locator=airsmart-user%40workspace%3A.: ENOENT: no such file or directory, lstat '/builds/monkeytronics/air-smart/node_modules/@capacitor/android'
➤ YN0000: └ Completed
➤ YN0000: · Failed with errors in 0s 82ms

I have a capacitor.config.json & ionic.config.json in the root of the app itself. And this all seems to hang together when I build and serve the app locally.

Apologies if very obvious issues in my approach, but full disclosure - it’s not my area of expertise (hence, hoping to be able to lean on Appflow to make life a little easier).

Perhaps there is a step by step nx example available which would help in isolating the issues with my approach???

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>