Instalacja customowego motywu w NodeRed

Cześć. Natrafiłem na ciekawy motyw do NR:

Tylko jak go zainstalować, w przypadku gdy NR jest dodatkiem do HA?

W konsoli polecenie “npm” nie jest obsługiwane przez HA.

Tego nie widziałem :person_facepalming: dzięki!

Jeżeli masz HA na Debianie to do obsługi trzeba doinstalować sobie npm

https://linuxize.com/post/how-to-install-node-js-on-debian-10/

https://www.vultr.com/docs/how-to-install-node-js–npm-on-debian-11/

$ sudo apt install nodejs npm -y

HA mam jako OS. Dodałem npm_package i… dostałem coś takiego:

[10:38:42] INFO: Starting installation of custom NPM/Node-RED packages...
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config only Use `--omit=dev` to omit dev dependencies from the install.
npm WARN deprecated @node-red-contrib-themes/solarized-dark-grey@1.0.2: This theme is now maintained at https://github.com/ristomatti/node-red-contrib-theme-solarized-dark-grey
added 1 package, and audited 709 packages in 8s
91 packages are looking for funding
  run `npm fund` for details
6 vulnerabilities (5 low, 1 moderate)
To address issues that do not require attention, run:
  npm audit fix
To address all issues (including breaking changes), run:
  npm audit fix --force
Run `npm audit` for details.

Motywu dostępnego nie mam w konfiguracji. Nie jestem zbyt biegły w tym także prosiłbym o wyrozumiałość i cierpliwość :wink:

Ten motyw który podałeś jest przestarzały, zainstaluj ten
@node-red-contrib-themes/theme-collection@v2.2 dodając go do


Do wyboru masz kilka motywów: https://github.com/node-red-contrib-themes/theme-collection

Następnie musisz wy edytować plik konfiguracyjny w katalogu NR settings.js (Zrób Kopię)

  // Customising the editor
  editorTheme: {
	  theme: "dracula",
    projects: {
      // To enable the Projects feature, set this value to true
      enabled: false,

    },
  },
};

Te motywy o których piszesz są dostępne w standardzie:

Mnie chodzi o ten konkretny, który podałem w pierwszym poście :+1:

Motyw jest z błędami wiec nie da się go zainstalować

root@debian:/usr/share/hassio/homeassistant/node-red# npm install @node-red-contrib-themes/solarized-dark-grey
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'node-red-contrib-filesystem@1.0.0',
npm WARN EBADENGINE   required: { node: '>= 14.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'node-red-contrib-home-assistant-websocket@0.46.1',
npm WARN EBADENGINE   required: { node: '>=14.0.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN deprecated @node-red-contrib-themes/solarized-dark-grey@1.0.2: This theme is now maintained at https://github.com/ristomatti/node-red-contrib-theme-solarized-dark-grey

1 polubienie

Aaa no to teraz jest jasne :+1: dzięki za wyjaśnienie, bo już zacząłem się irytować :grin: