aws-amplify / aws-amplify/amplify-hosting

NPM Run Build Killed without information on why

Open
#2,036 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-console/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-console/issues?q=is%3Aissue+).
- [x] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-console/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

### App Id

d2isqxxj9rr0jf

### Region

us-east-2

### Amplify Console feature

Backend builds, Build settings, Custom builds, Manual deploys

### Describe the bug

I have linked my AWS Amplify app to a new React Gatsby GitHub repo for continuous deployment. The app compiles fine locally, but I am getting an error in the 'Frontend' during the AWS build, saying that the amplify.sh file is 'killed' at the npm run build line, followed by 'Non-Zero Exit Code Detected' error. Below is a link to a screenshot of the error:

[AWS Amplify Error](https://i.stack.imgur.com/3IJLO.png)

Below is a link to the repo:
[MultiBDoyle Personal Blog](https://github.com/multibdoyle/personal-blog
)

Do I need to edit the amplify.yml file, or maybe add something to a package-lock or gatsby-node file?

### Expected behavior

Expecting to see site re-published with latest GitHub repo changes applied.

### Reproduction steps

1. Push code updates (added new blog posts) from local to remote origin
2. App is set-up for continuous deployment, and is expect to refresh with latest updates from GitHub
3. Amplify gives error 'Build failed...Non-Zero Exit Code Detected Error'

### Build Settings

```yaml
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: public
files:
- '**/*'
cache:
paths:
- node_modules/**/*
```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked repository and its amplify.yml; inspect the npm ci and npm run build commands alongside the reported amplify.sh failure. Compare the build configuration with the local reproduction and identify the change needed for the Amplify build to complete and publish the public/ artifact.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, react
Domain
build-system, ci-cd, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.