File System Error when deploying git

Running into a file system error when following this guide

running git push balena master rather than resin master.

[file-manager] npm ERR!
[file-manager] errno -2
[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/’
[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] npm
[file-manager] ERR! A complete log of this run can be found in:
[file-manager] npm
[file-manager] ERR! /root/.npm/_logs/2020-06-27T03_49_47_539Z-debug.log
[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
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to ‘’

not sure how to access the logs.

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

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):

I think it should be simply bin/ 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 :slight_smile:

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

How do I go about this?

Hey, as Roman suggested I have created a PR with the fix. Once it is merged, a re-build will fix it.

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

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 to RUN npm install -g

The boombastic project should now build successfully.