skip to Main Content

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


  1. Chosen as BEST ANSWER

    I was able to fix this issue by changing my yml from:

    applications:
      - frontend: ...
        appRoot: frontend
      - backend: ...
    

    to:

    applications:
      - appRoot: frontend
        frontend: ...
        backend: ...
    

    where the appRoot: frontend is the root of my monorepo


  2. Others 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 the appRoot key.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search