# \[Resolved\] CODEBUILD failed after code change, reverting changes doesn't help (localhost component works, no errors)

**URL:** https://community.weweb.io/t/resolved-codebuild-failed-after-code-change-reverting-changes-doesnt-help-localhost-component-works-no-errors/2009
**Category:** Developer corner
**Created:** [March 11, 2023, 12:31am UTC](https://community.weweb.io/t/resolved-codebuild-failed-after-code-change-reverting-changes-doesnt-help-localhost-component-works-no-errors/2009 "2023-03-11T00:31:21Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Anna.fae](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/anna.fae/32/776_2.png) [@Anna.fae](https://community.weweb.io/u/Anna.fae)
#### Post date: [March 11, 2023, 12:31am UTC](https://community.weweb.io/t/resolved-codebuild-failed-after-code-change-reverting-changes-doesnt-help-localhost-component-works-no-errors/2009/1 "2023-03-11T00:31:21Z")

</div>

Me and my colleague developer are building custom component with canvas and have it on Github.  
Today we’ve updated the last build and it was working, we tested it.

Then we added 1 line of code:

```auto
     this.$emit('trigger-event', { name: 'change', event: { value: '' } });

```

and got “CODEBUILD failed”

![Screenshot 2023-03-10 at 19.32.01](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bff9e5e60ed7f795c24d278c5d1c2eacd5adf6ca.png)

‼ We removed that line of code (reverted to last working version) but “CODEBUILD failed” doesn’t go since it’s first appear ‼

I have found this ticket: [[solved] CODEBUILD\_FAILED error for custom element that was building fine 3 days ago](https://community.weweb.io/t/solved-codebuild-failed-error-for-custom-element-that-was-building-fine-3-days-ago/1918)  
but we don’t have any typescript and any dependencies in the component…

How to fix this?  
Is there any way to debug that errors? why CODEBUILD fails? we are spending a lot of time to fix things that are unpredictable and we have no idea why they happen.

---

<div class="post-metadata">

### Author: ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)
#### Post date: [March 11, 2023, 7:53am UTC](https://community.weweb.io/t/resolved-codebuild-failed-after-code-change-reverting-changes-doesnt-help-localhost-component-works-no-errors/2009/2 "2023-03-11T07:53:47Z")

</div>

Build it locally to see what’s wrong.

---

<div class="post-metadata">

### Author: ![Anna.fae](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/anna.fae/32/776_2.png) [@Anna.fae](https://community.weweb.io/u/Anna.fae)
#### Post date: [March 11, 2023, 11:35am UTC](https://community.weweb.io/t/resolved-codebuild-failed-after-code-change-reverting-changes-doesnt-help-localhost-component-works-no-errors/2009/3 "2023-03-11T11:35:40Z")

</div>

It works on localhost with no errors in console. It was building yesterday from Github as well.

---

<div class="post-metadata">

### Author: ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)
#### Post date: [March 11, 2023, 11:57am UTC](https://community.weweb.io/t/resolved-codebuild-failed-after-code-change-reverting-changes-doesnt-help-localhost-component-works-no-errors/2009/4 "2023-03-11T11:57:54Z")

</div>

The build process is different from the development process.  
Build it locally and see what error you have.

---

<div class="post-metadata">

### Author: ![Anna.fae](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/anna.fae/32/776_2.png) [@Anna.fae](https://community.weweb.io/u/Anna.fae)
#### Post date: [March 11, 2023, 12:02pm UTC](https://community.weweb.io/t/resolved-codebuild-failed-after-code-change-reverting-changes-doesnt-help-localhost-component-works-no-errors/2009/5 "2023-03-11T12:02:34Z")

</div>

no errors at all anywhere. we reverted changes to previous build that was building successfully and used for 3 days in Weweb from Github, but CODEBUILD\_ERROR still shown.

---

<div class="post-metadata">

### Author: ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)
#### Post date: [March 11, 2023, 12:51pm UTC](https://community.weweb.io/t/resolved-codebuild-failed-after-code-change-reverting-changes-doesnt-help-localhost-component-works-no-errors/2009/6 "2023-03-11T12:51:11Z")

</div>

If you did a clean install + build of your repo and it builds correctly then maybe you should talk with weweb team.  
But I would double check with a clean local build first.

---

<div class="post-metadata">

### Author: ![Anna.fae](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/anna.fae/32/776_2.png) [@Anna.fae](https://community.weweb.io/u/Anna.fae)
#### Post date: [March 13, 2023, 1:28pm UTC](https://community.weweb.io/t/resolved-codebuild-failed-after-code-change-reverting-changes-doesnt-help-localhost-component-works-no-errors/2009/7 "2023-03-13T13:28:13Z")

</div>

Thank you, that really helped. Clean install + Ive just copied code and no codebuild error

I want to request weweb team to add log of "codebuild fail " case on component page. This will help to fix issues.
