I am running docker with node red. I try to install: node-red-contrib-tasmota 1.0.0
Only i get an error when i try this to install in nodered [docker running]
2024-12-27T16:41:27.537Z Install : node-red-contrib-tasmota 1.0.0
2024-12-27T16:41:26.979Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-tasmota@1.0.0
2024-12-27T16:41:28.028Z [err] npm
2024-12-27T16:41:28.029Z [err] WARN
2024-12-27T16:41:28.029Z [err] config production Use `--omit=dev` instead.
2024-12-27T16:41:29.552Z [err] npm
2024-12-27T16:41:29.552Z [err] ERR! code EACCES
2024-12-27T16:41:29.552Z [err] npm ERR!
2024-12-27T16:41:29.553Z [err] syscall open
2024-12-27T16:41:29.553Z [err] npm ERR!
2024-12-27T16:41:29.553Z [err] path /data/.npm/_cacache/tmp/d9939d6b
2024-12-27T16:41:29.554Z [err] npm ERR! errno -13
2024-12-27T16:41:29.557Z [err] npm ERR!
2024-12-27T16:41:29.557Z [err] npm
2024-12-27T16:41:29.558Z [err] ERR! Your cache folder contains root-owned files, due to a bug in
2024-12-27T16:41:29.558Z [err] npm ERR! previous versions of npm which has since been addressed.
2024-12-27T16:41:29.558Z [err] npm
2024-12-27T16:41:29.558Z [err] ERR!
2024-12-27T16:41:29.558Z [err] npm ERR! To permanently fix this problem, please run:
2024-12-27T16:41:29.558Z [err] npm ERR! sudo chown -R 1000:1000 "/data/.npm"
2024-12-27T16:41:29.562Z [err]
2024-12-27T16:41:29.563Z [err] npm ERR! A complete log of this run can be found in:
2024-12-27T16:41:29.563Z [err] npm ERR! /data/.npm/_logs/2024-12-27T16_41_27_955Z-debug-0.log
2024-12-27T16:41:29.578Z rc=243
I d not understand teh example npm install like some wiki says.. So please is there a way to install a extra node wit for example a line into my docker compose file?
Which nodered version do you run with your docker instance?
I just tested with latest 4.0.8 and it successfully installs:
2024-12-27T18:22:56.675Z Installieren : node-red-contrib-tasmota 1.0.0
2024-12-27T18:22:56.736Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --omit=dev --engine-strict node-red-contrib-tasmota@1.0.0
2024-12-27T18:23:01.078Z [err] npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
2024-12-27T18:23:01.119Z [err] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
2024-12-27T18:23:01.742Z [out]
2024-12-27T18:23:01.742Z [out] added 47 packages in 5s
2024-12-27T18:23:01.757Z rc=0
Aside: Have you tried to run
sudo chown -R 1000:1000 "/data/.npm" in your nodered data folder? As per your error messages indicate?
Be careful with my following advise if you rely on persistent data related to your nodered instance. If so, backup your volume 'node-red-data' before going ahead.
One thing you could try at your own risk is to gain access to your running node-red container with:
docker exec -it node-red bash
OR
docker exec -it node-red sh
And run before mentioned from within your container
I find this on the internet [ long time ago ]
Do i need to remove the # for: #- ./config:/nodered/config #- ./data:/nodered/data #- ./log:/nodered/log #- ./data:/data
node-red in this command refers to your "node-red" named service in docker-compose.yml. Did you start your container with this docker-compose.yml?
what is the output of docker container list?
EDIT: I see. Your node-red container has no explicit name. My bad. I am so used to it, that I oversaw it
EDIT II: Since your docker-compose.yml does not provide an explicit name for your node-red container, you will have to use the container id instead of node-red. the id is provided with docker container list, hence leading to docker exec -it CONTAINER-ID-HERE bash
Really, you should not be using Docker unless you understand how to use it. Unless you have a good reason then don't use Docker, it just makes like more complicated.
need to learn something.. I using Domoticz for my smart home. Every year step by step smarter. Only ia m from the 70's so windows 98 millenium bug etc MNo one teached me some computer..... So i proud to run my odroid and some linux .. Also proud i can use a lot software.. ! I Am teacher in building construtions.. With al lot software, like acad, sketchup, twinmotion revit, solidworks, inventor, etc.. Like the help here in forum... So hope you can help me somewhere...