-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] !!! CustomerError: : Invalid Monorepo spec provided. The "appRoot" key needs to be a string #3900
Comments
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you! |
@ullattil I'm having the same exact issue when deploying a new version of an app today. Changes were only text modification in an Astro build, nothing major. Was working fine before and I also did not make changes to any config or such. It's also really confusing to get two, completely unrelated, error messages as you said:
and
I tried reconnecting the repo but that did not work. |
Hi 👋 , could you please provide the AppId and also the buildSpec you are using to build your application? Thanks Note: We will use buildSpec in |
Ok so I spoke with Jay in the AWS Amplify discord and he solved the issue for me, in case it helps @ullattil We initially had the frontend and backend together and, even though the backend has always been deployed separatelly, because the frontend lived under the
We've recently moved the backend and frontend separately, so I modified the app root a couple of weeks ago:
Jay said that "We recently added a check which validates if this attribute within the buildSpec is accurate and if not the build would fail." And thus the reason for the error we began experiencing. I solved it by changing my build spec and removing the backend and appRoot completely:
|
I am having the same issue and it is not yet resolved even after removing the app root and backend from the yml file. |
I tried all the solutions on the previous comments without any success. After reviewing the AWS Amplify hosting documentation again (https://docs.aws.amazon.com/amplify/latest/userguide/monorepo-configuration.html) I modified the syntax of my amplify.yml file and this solved the bug. Basically, for monorepo aplications, the appRoot becomes the main node that encapsulates the environments like this: version: 1 |
@martin-stefan Can you please share your build spec? |
This is what it looked like before removing appRoot. The structure of my monorepo is:
yml file:
My environment variable looks like: |
I tried this and it finally fixed the issue I had, Thanks a lot for every ones contribution, I will keep this issue open for another week in case someone else is also migrating to the new format. |
I was able to fix this issue by changing my yml from:
to:
where frontend is the root of my monorepo |
This issue has been automatically locked. |
Before opening, please confirm:
Amplify Hosting feature
Backend builds, Monorepo
Is your feature request related to a problem? Please describe:
I had a working app during the last commit. The new commit does not add any code or change any files except for logs (app and src remain untouched). Now every time I try to build the app I get a [ERROR]: !!! CustomerError: Invalid Monorepo spec provided. The "appRoot" key needs to be a string.
Along with an error that states "There was an issue connecting to your repo provider, click "Reconnect repository" in General Settings, and then try your build again."
Even though this was never an issue in the previous 34 successful builds of the same app. I haven't modified the build setting or any other feature within the studio in the time since my last commit. Neither have I changed anything in the source code. It doesn't not make sense to me. I have tried surrounding the appRoot key with quotation marks, yet the issue persists. I have also tried using an older branch containing an old version of the app that worked and that too failed. I have also tried building the app on the last working commit and that was also unsuccessful and gave the same error. In short, Nothing was changed but now I can't build any new versions of the same app, despite having the exact same code and settings on the console.
The old deployed version of the app is still accessible on the internet and works just as intended when the last commit was deployed.
I have also correctly set the environment variables according to the provided documentation. I also don't have a amplify.yml file in the repo, although I already tried to include it in the repo to see if it solved the problem but it didn't.
Describe how you'd like this feature to work
I hope this isn't a small oversight on my part. I am raising this issue to see if there is any way I can solve the issue without having to build the entire backend of the app using amplify again. I believe that this is a bug and the error messages might be misleading as the app was build without errors using the same code and build settings a few weeks earlier.
The text was updated successfully, but these errors were encountered: