aws-amplify / aws-amplify/amplify-hosting
Monorepo build error without build script defined in root package json file
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Following the very basic monorepo guides I have 2 sites; a CRA site and a NextJS site.
When I import them via the UI connecting to git, everything seems to be right but I get the same error on both apps in the build phase:
`[ERROR]: !!! TypeError: Cannot read property 'build' of undefined`
**To Reproduce**
Fork the following repo https://github.com/SiTaggart/mono-repo-hosting
I have included the `amplify.yml` file as a means of showing how it's set up and configured.
**Expected behavior**
I am able to deploy both sites from the monorepo
Contributor guide
Research direction
Start with the linked mono-repo-hosting reproduction, especially its amplify.yml and root package.json, and trace how the two applications are handled during the build phase. Confirm the behavior for both the CRA and NextJS sites, then verify that each can deploy successfully from the monorepo without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, next.js, react
- Domain
- build-system, ci-cd, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100