I have a project which consists of the frontend using next.js and backend using Amplify. Initially, I was working on the backend separately using just lambdas and other services while my colleague was working on the frontend. The structure of my project is as follows:
Project Structure
Now, I was actively pushing the backend to AWS Amplify. Now that my collegueue has given me the frontend code, I added it to my repo and am trying to host the frontend. The problem is that when I try doing that, in the build section, I get the following error:
## Starting Backend Build
## Checking for associated backend environment...
## Backend environment association found
???? Creating a nested amplify project is not supported
Project root detected in: /codebuild/output/src285571462/src/platform
Resolution: Rename or move the existing 'amplify' directory from: codebuild/output/src285571462/src/platform
I don’t know what I am doing wrong here. I am new to hosting and am not sure what to do. Thanks a lot!
In the hosting options on Amplify, I connected my github repo to it and specified that it was a monorepo and gave it the path of frontend
, but this is still the error I get. I tried renaming the amplify folder as well, but that is created automatically when I do amplify init
and changing it did not help since it gave me an error saying that the amplify
folder could not be found.
Izaan Aamir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.