如果容器卷位于闪存驱动器上,则我无法在Node-red中安装新调色板,因为npm没有正确的访问权限。你能帮我吗?
# docker-compose.yml
node-red:
container_name: node-red
image: nodered/node-red:latest
restart: unless-stopped
environment:
- TZ=Europe/Rome
network_mode: "host"
ports:
- "1880:1880"
volumes:
- /media/data/node-red:/data <---- MY USB FLASH DRIVE (FAT32 - vfat)
# - /home/pi/data/node-red:/data. <<-- default place
user: 1000:1000
depends_on:
# - homeassistant
- mosquitto
OS是pi4上的raspian lite,并且USB驱动器在启动时通过以下选项安装:
# /etc/fstab
PARTUUID=af3416fc-01 /media/data vfat auto,rw,user,users,exec,noatime,uid=1000,gui=1000,umask=000 0 0
这是日志文件
2020-01-11T13:20:54.190Z Install : node-red-contrib-home-assistant-websocket 0.19.3
2020-01-11T13:20:54.216Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production [email protected]
2020-01-11T13:21:08.370Z [err] npm
2020-01-11T13:21:08.371Z [err]
2020-01-11T13:21:08.371Z [err] ERR! code EPERM
2020-01-11T13:21:08.372Z [err] npm
2020-01-11T13:21:08.372Z [err] ERR! syscall symlink
2020-01-11T13:21:08.372Z [err] npm ERR! path
2020-01-11T13:21:08.372Z [err] ../flat/cli.js
2020-01-11T13:21:08.372Z [err] npm
2020-01-11T13:21:08.372Z [err] ERR! dest /data/node_modules/.bin/flat
2020-01-11T13:21:08.372Z [err] npm
2020-01-11T13:21:08.373Z [err] ERR! errno -1
2020-01-11T13:21:08.380Z [err] npm
2020-01-11T13:21:08.380Z [err] ERR! Error: EPERM: operation not permitted, symlink '../flat/cli.js' -> '/data/node_modules/.bin/flat'
2020-01-11T13:21:08.380Z [err] npm ERR! { [Error: EPERM: operation not permitted, symlink '../flat/cli.js' -> '/data/node_modules/.bin/flat']
2020-01-11T13:21:08.380Z [err] npm ERR! cause:
2020-01-11T13:21:08.380Z [err] npm
2020-01-11T13:21:08.381Z [err] ERR! { Error: EPERM: operation not permitted, symlink '../flat/cli.js' -> '/data/node_modules/.bin/flat'
2020-01-11T13:21:08.381Z [err] npm ERR!
2020-01-11T13:21:08.381Z [err] errno: -1,
2020-01-11T13:21:08.381Z [err] npm ERR! code: 'EPERM',
2020-01-11T13:21:08.381Z [err] npm ERR! syscall: 'symlink',
2020-01-11T13:21:08.381Z [err] npm
2020-01-11T13:21:08.381Z [err] ERR! path: '../flat/cli.js',
2020-01-11T13:21:08.381Z [err] npm
2020-01-11T13:21:08.381Z [err] ERR! dest: '/data/node_modules/.bin/flat' },
2020-01-11T13:21:08.381Z [err] npm
2020-01-11T13:21:08.381Z [err] ERR! stack:
2020-01-11T13:21:08.381Z [err] npm
2020-01-11T13:21:08.382Z [err] ERR! 'Error: EPERM: operation not permitted, symlink \'../flat/cli.js\' -> \'/data/node_modules/.bin/flat\'',
2020-01-11T13:21:08.382Z [err] npm ERR!
2020-01-11T13:21:08.382Z [err] errno: -1,
2020-01-11T13:21:08.382Z [err] npm ERR!
2020-01-11T13:21:08.382Z [err] code: 'EPERM',
2020-01-11T13:21:08.382Z [err] npm ERR!
2020-01-11T13:21:08.382Z [err] syscall: 'symlink',
2020-01-11T13:21:08.382Z [err] npm ERR!
2020-01-11T13:21:08.382Z [err] path: '../flat/cli.js',
2020-01-11T13:21:08.382Z [err] npm ERR! dest: '/data/node_modules/.bin/flat',
2020-01-11T13:21:08.382Z [err] npm ERR! parent: 'data' }
2020-01-11T13:21:08.383Z [err] npm
2020-01-11T13:21:08.383Z [err] ERR!
2020-01-11T13:21:08.383Z [err] npm ERR! The operation was rejected by your operating system.
2020-01-11T13:21:08.383Z [err] npm ERR! It is likely you do not have the permissions to access this file as the current user
2020-01-11T13:21:08.383Z [err] npm
2020-01-11T13:21:08.383Z [err] ERR!
2020-01-11T13:21:08.383Z [err] npm
2020-01-11T13:21:08.383Z [err] ERR! If you believe this might be a permissions issue, please double-check the
2020-01-11T13:21:08.383Z [err] npm
2020-01-11T13:21:08.383Z [err] ERR! permissions of the file and its containing directories, or try running
2020-01-11T13:21:08.383Z [err] npm ERR!
2020-01-11T13:21:08.383Z [err] the command again as root/Administrator.
2020-01-11T13:21:08.408Z [err]
2020-01-11T13:21:08.409Z [err] npm ERR! A complete log of this run can be found in:
2020-01-11T13:21:08.409Z [err] npm
2020-01-11T13:21:08.409Z [err] ERR! /usr/src/node-red/.npm/_logs/2020-01-11T13_21_08_392Z-debug.log
2020-01-11T13:21:08.423Z rc=255
编辑:添加完整的/ etc / fstab行和从webbrowser获得的npm安装日志
提前感谢
这不起作用,因为USB记忆棒上的胖文件系统不支持符号链接,npm试图将其用作安装节点的一部分。
您最好的选择是重新格式化USB记忆棒以使用ext2(或类似文件)作为文件系统。