You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-file-manager/node-file-manager/bin/node-file-manager.sh'
npm ERR!
enoent This is related to npm not being able to find a file.
npm
ERR!
enoent
npm
ERR!
A complete log of this run can be found in:
npm
ERR!
/root/.npm/_logs/2020-06-27T19_10_35_184Z-debug.log
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
Any way to fix this?
Thanks
The text was updated successfully, but these errors were encountered:
This changes the installation from the npm registry which fails, to downloading the git repo and installing locally to /opt/node-file-manager-master. Subsequently it is necessary to call the binary from this path rather than using the globally install binary previously obtained.
FROM balenalib/%%BALENA_MACHINE_NAME%%-node:12-run
# Move to app dir
RUN mkdir -p /usr/src/app/
WORKDIR /usr/src/app
COPY ./app/package.json ./
RUN apt update && \
apt install wget unzip -y --no-install-recommends && \
cd /opt && wget https://github.com/efeiefei/node-file-manager/archive/master.zip && \
unzip master.zip && rm master.zip && \
cd node-file-manager-master && \
npm i
RUN JOBS=MAX npm install --unsafe-perm --production
RUN npm cache clean --force && rm -rf /tmp/*
# Move app to filesystem
COPY ./app ./
# Start app
CMD ["bash", "/usr/src/app/start.sh"]
Inside file-manager/app/index.js
I changed the line of the const filemanager into the following one: const filemanager = spawn('node', ['/opt/node-file-manager-master/lib/index.js','-p', '8000', '-d', '/data/mopidy/media']);
This fixes the building of this image for me, but I have not been able to test the actual execution because I faced another error with raspotify. It does not run on Buster and not on arm64 (aarch64) only armhf, so I am recompiling it on aarch64 and supplying my own binary.
While following the guide, I used
Step 1/9 : FROM balenalib/raspberrypi3-node:12-run
---> 64d4d9c241bb
Step 2/9 : RUN mkdir -p /usr/src/app/
Using cache
---> 3ef7c60c0903
Step 3/9 : WORKDIR /usr/src/app
Using cache
---> 3ff15989b2e6
Step 4/9 : COPY ./app/package.json ./
Using cache
---> 8d66e136d718
Step 5/9 : RUN npm install --unsafe-perm -g node-file-manager
---> Running in 30b017403de0
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/node-file-manager/node-file-manager/bin/node-file-manager.sh
npm ERR!
errno -2
npm ERR!
enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-file-manager/node-file-manager/bin/node-file-manager.sh'
npm ERR!
enoent This is related to npm not being able to find a file.
npm
ERR!
enoent
npm
ERR!
A complete log of this run can be found in:
npm
ERR!
/root/.npm/_logs/2020-06-27T19_10_35_184Z-debug.log
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
Any way to fix this?
Thanks
The text was updated successfully, but these errors were encountered: