After merging a new pull request in my GitHub repository, the automatic build of my Amplify App fails due to ‘Invalid Monorepo spec provided. The "appRoot" key needs to be a string’.
I have not changed any of the settings of the repository or amplify app including the environment variables. When checking the environment variables and build settings, they both look like this:
build settings
environment variables.
I have tried reconnecting the repository as well as merging a test pull request to trigger the automatic build, however it still fails.
2
Answers
I was able to fix this issue by changing my yml from:
to:
where the
appRoot: frontend
is the root of my monorepoOthers seem to be running into this as well, this Issue has a resolution that seems to be working.
In short, a recent validation was added for the
buildSpec
. One possible work-around is to remove theappRoot
key.