# balena push vs build and deploy

**URL:** <https://forums.balena.io/t/balena-push-vs-build-and-deploy/60109>\
**Category:** Product support\
**Created:** [January 29, 2020, 1:08am UTC](https://forums.balena.io/t/balena-push-vs-build-and-deploy/60109 "2020-01-29T01:08:42Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![nazrhom](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@nazrhom](https://forums.balena.io/u/nazrhom)\
**Post date:** [February 19, 2020, 4:40pm UTC](https://forums.balena.io/t/balena-push-vs-build-and-deploy/60109/45 "2020-02-19T16:40:21Z")

</div>

Hey @0xff, bit of a wild guess, but is there any chance you are missing a `.dockerignore` file? When you run `COPY . ./` it might overwrite the `node_modules` folder copied at the previous step from the build container if that folder is not in `.dockerignore`

---

<div class="post-metadata">

**Author:** ![majorz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/majorz/32/639_2.png) [@majorz](https://forums.balena.io/u/majorz)\
**Post date:** [February 19, 2020, 4:52pm UTC](https://forums.balena.io/t/balena-push-vs-build-and-deploy/60109/47 "2020-02-19T16:52:57Z")

</div>

Also if the above is not the answer, you may try narrowing down the issue more and more and focus on the serial nodejs library where the error originates from. From its documentation I see `By default, we auto-detect Windows, Linux and OS X, and load the appropriate module for your system.` - if the library is doing some serial port probing during build, it will not be the same as doing the build on the device itself. All in all you need to narrow down the origin of the issue by removing things out from your build.

---

<div class="post-metadata">

**Author:** ![0xff](https://avatars.discourse-cdn.com/v4/letter/0/5fc32e/32.png) [@0xff](https://forums.balena.io/u/0xff)\
**Post date:** [February 19, 2020, 11:33pm UTC](https://forums.balena.io/t/balena-push-vs-build-and-deploy/60109/49 "2020-02-19T23:33:20Z")

</div>

That did the trick. I owe you at least a beer! Many many thanks. Now onto the next issue…

---

<div class="post-metadata">

**Author:** ![samothx](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@samothx](https://forums.balena.io/u/samothx)\
**Post date:** [February 19, 2020, 11:57pm UTC](https://forums.balena.io/t/balena-push-vs-build-and-deploy/60109/50 "2020-02-19T23:57:43Z")

</div>

Hi,  
this is quite a long conversation already it is hard to make out what would be the next issue. Can you point us in the right direction ?  
Regards Thomas

---

<div class="post-metadata">

**Author:** ![0xff](https://avatars.discourse-cdn.com/v4/letter/0/5fc32e/32.png) [@0xff](https://forums.balena.io/u/0xff)\
**Post date:** [February 20, 2020, 12:02am UTC](https://forums.balena.io/t/balena-push-vs-build-and-deploy/60109/52 "2020-02-20T00:02:06Z")

</div>

Sorry - I just meant that that you had solved the issue addressed in this thread but that I had miles to go before I sleep, so to speak.

If I need help with other issues I’ll open other threads.

Thanks again for staying with me until it was solved.

.

---

<div class="post-metadata">

**Author:** ![samothx](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@samothx](https://forums.balena.io/u/samothx)\
**Post date:** [February 20, 2020, 12:04am UTC](https://forums.balena.io/t/balena-push-vs-build-and-deploy/60109/53 "2020-02-20T00:04:16Z")

</div>

No worries, we are happy that this worked for you.

[Previous page](https://forums.balena.io/t/balena-push-vs-build-and-deploy/60109.md?page=1)
