Comments (6)
By the error message you're getting, you're probably trying to install the package in the wrong directory.
I think you have to install the package into /data
inside the container in this case.
from dracula.
@bonanitech Thanks for the quick reply! I tried this using the following method, but got the same error
bash-5.0$ npm install --prefix /data @node-red-contrib-themes/dracula
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /.npm
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1020:1002 "/.npm"
Is there another way to specify this directory?
from dracula.
cd /data
npm install @node-red-contrib-themes/dracula
from dracula.
@bonanitech I got the same error when switching into that directory. Do I need to install these packages as root? when I run whoami
it shows as the 1020, which is the user I have for user: $PUID
in my compose file
from dracula.
I was able to get this installed. I had to login to the container as root, and then install the container. Here are the steps I took:
docker exec -it -u root NodeRed bash
cd /data
npm install @node-red-contrib-themes/dracula
This was most likely required since I chose to run the container as another user so I can access the files with my user and not have them be restricted to root (by setting the user
attribute in docker-compose). This issue can be closed. Thanks for your help!
from dracula.
As an addendum to this, here is my docker compose to get the theme to remain installed after reboot/update:
---
version: "2.3"
services:
node-red:
image: nodered/node-red
container_name: node-red
ports:
- 1880:1880
volumes:
- ${USERDIR}/node-red:/data:rw
entrypoint: ["/bin/sh", "-c"]
command:
- |
cd /usr/src/node-red
npm i @node-red-contrib-themes/dracula
npm start --cache /data/.npm -- --userDir /data
from dracula.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dracula.