# File System Error when deploying git

**URL:** <https://forums.balena.io/t/file-system-error-when-deploying-git/144736>\
**Category:** Product support\
**Created:** [June 27, 2020, 3:51am UTC](https://forums.balena.io/t/file-system-error-when-deploying-git/144736 "2020-06-27T03:51:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shayner2005](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@Shayner2005](https://forums.balena.io/u/Shayner2005)\
**Post date:** [June 27, 2020, 3:51am UTC](https://forums.balena.io/t/file-system-error-when-deploying-git/144736/1 "2020-06-27T03:51:12Z")

</div>

Running into a file system error when following this guide

> **[GitHub - balena-io-experimental/boombeastic: A Raspberry Pi based smart...](https://github.com/balena-io-experimental/boombeastic)**
>
> A Raspberry Pi based smart connected speaker with support for airplay, spotify, mpd and local playback - GitHub - balena-io-experimental/boombeastic: A Raspberry Pi based smart connected speaker w...

running git push balena master rather than resin master.

> Blockquote  
> [file-manager] npm ERR!  
> [file-manager] errno -2  
> [file-manager]  
> [file-manager] npm  
> [file-manager] ERR!  
> [file-manager] enoent  
> [file-manager] ENOENT: no such file or directory, chmod ‘/usr/local/lib/node\_modules/node-file-manager/node-file-manager/bin/node-file-manager.sh’  
> [file-manager] npm ERR!  
> [file-manager] enoent  
> [file-manager] This is related to npm not being able to find a file.  
> [file-manager] npm ERR! enoent  
> [file-manager]  
> [file-manager]  
> [file-manager]  
> [file-manager] npm  
> [file-manager] ERR! A complete log of this run can be found in:  
> [file-manager]  
> [file-manager] npm  
> [file-manager] ERR! /root/.npm/\_logs/2020-06-27T03\_49\_47\_539Z-debug.log  
> [file-manager]  
> [file-manager] The command ‘/bin/sh -c npm install --unsafe-perm -g node-file-manager’ returned a non-zero code: 254  
> [Info] Uploading images  
> [Success] Successfully uploaded images  
> [Error] Some services failed to build:  
> [Error] Service: file-manager  
> [Error] Error: The command ‘/bin/sh -c npm install --unsafe-perm -g node-file-manager’ returned a non-zero code: 254  
> [Info] Built on arm01  
> [Error] Not deploying release.

remote: error: hook declined to update refs/heads/master  
To [git.balena-cloud.com](http://git.balena-cloud.com):g\_shayne\_smith/boombeastic.git  
! [remote rejected] master → master (hook declined)  
error: failed to push some refs to ‘[git.balena-cloud.com](http://git.balena-cloud.com):g\_shayne\_smith/boombeastic.git’

not sure how to access the logs.  
Thanks

---

<div class="post-metadata">

**Author:** ![roman-mazur](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/roman-mazur/32/2194_2.png) [@roman-mazur](https://forums.balena.io/u/roman-mazur)\
**Post date:** [June 29, 2020, 9:43am UTC](https://forums.balena.io/t/file-system-error-when-deploying-git/144736/4 "2020-06-29T09:43:05Z")

</div>

Hey, boombeastic uses this npm package for the file manager functionality:

> **[node-file-manager](https://www.npmjs.com/package/node-file-manager)**
>
> File manager web based on Koa and Angular.js

  
And it looks like it has a weird reference to the sh file mentioned in the error message (that reference tries to escape the project root):  

> <https://github.com/efeiefei/node-file-manager/blob/master/package.json#L10>

  
I think it should be simply `bin/node-file-manager.sh` instead.

Maybe this was working with older npm versions before, but definitely does not work now.  
The correct way would be to fix it in the node-file-manager module, but I cannot submit a pull request because github is having issues 🙂

Another way to fix this might be trying a base image with an older NPM version.

---

<div class="post-metadata">

**Author:** ![Shayner2005](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@Shayner2005](https://forums.balena.io/u/Shayner2005)\
**Post date:** [June 29, 2020, 8:57pm UTC](https://forums.balena.io/t/file-system-error-when-deploying-git/144736/6 "2020-06-29T20:57:39Z")

</div>

> [@roman-mazur](#):
>
> I think it should be simply `bin/node-file-manager.sh` instead.
> 
> Maybe this was working with older npm versions before, but definitely does not work now.  
> The correct way would be to fix it in the node-file-manager module, but I cannot submit a pull request because github is having issues 🙂
> 
> Another way to fix this might be trying a base image with an older NPM version.

How do I go about this?

---

<div class="post-metadata">

**Author:** ![iamsolankiamit](https://avatars.discourse-cdn.com/v4/letter/i/a88e4f/32.png) [@iamsolankiamit](https://forums.balena.io/u/iamsolankiamit)\
**Post date:** [June 30, 2020, 8:03am UTC](https://forums.balena.io/t/file-system-error-when-deploying-git/144736/8 "2020-06-30T08:03:28Z")

</div>

Hey, as Roman suggested I have created a [PR with the fix](https://github.com/efeiefei/node-file-manager/pull/35). Once it is merged, a re-build will fix it.

---

<div class="post-metadata">

**Author:** ![Shayner2005](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@Shayner2005](https://forums.balena.io/u/Shayner2005)\
**Post date:** [July 5, 2020, 9:57pm UTC](https://forums.balena.io/t/file-system-error-when-deploying-git/144736/10 "2020-07-05T21:57:47Z")

</div>

Can the repository be forked until the original is merged? What file would I change to redirect to the fork itself?

---

<div class="post-metadata">

**Author:** ![rahul-thakoor](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@rahul-thakoor](https://forums.balena.io/u/rahul-thakoor)\
**Post date:** [July 6, 2020, 9:00am UTC](https://forums.balena.io/t/file-system-error-when-deploying-git/144736/12 "2020-07-06T09:00:13Z")

</div>

Hey there,  
I would recommend waiting for the upstream PR to be merged and using that.

But to answer your question, here is the workaround:  
Change the line `RUN npm install --unsafe-perm -g node-file-manager` [here](https://github.com/balenalabs/boombeastic/blob/master/file-manager/Dockerfile.template#L8) to `RUN npm install -g https://github.com/iamsolankiamit/node-file-manager/tarball/patch-1`

The boombastic project should now build successfully.

Thanks!
