Ionic deploy build on the sub-directory

On ionic dashbord, I configured that I can build my own application automatically. (Deploy -> Builds )However, the following error is output.

[Missing package.json in app.]

I think that this cause is that there is no package.json in the root directory of the repository.
My ionic repository of github does not have the application directory directly in the root, and the application is arranged in the app subdirectory as follows.

/ app

  • package.json
  • src /

When making automatic build, can you let this app subdirectory be recognized as the current directory and execute the build?
Please tell me if you know.

@totoppi did you ever figure this out?

Did you ever figure this out? lol @timclicker

@bhq yes I hacked it by having a package.json at the root with a preinstall script that basically moves the app to the root and deletes everything else (there’s probably a better way to write this script)

echo “running appflow.sh . . .”;

if [ “$CI_APP_ID” = “Jsjw273” ] # ionic appflow app id

then

echo “Moving mobile app to root so that Appflow works”;

echo “remove everything except mobile/app directory”;

find * -maxdepth 0 -name ‘mobile’ -prune -o -exec rm -rf ‘{}’ ‘;’

rm -rf README.md

rm -rf docs

rm -rf packages

rm -rf setup-complete.txt

rm -rf web

rm -rf node_modules

rm -rf package-lock.json

rm -rf functions

rm -rf netlify.toml

echo “move to root”;

mv -v ./mobile/app/* ./

Ahh I see, wasn’t aware of creating scripts to move the root around like that. I might give it a try. Thank you!