Openhabian-config (npm - update)

Configuration:

runtimeInfo:
  version: 5.1.3
  buildString: Release Build
locale: de-DE
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 21.0.10
  javaVendor: Eclipse Adoptium
  javaVendorVersion: Temurin-21.0.10+7
  osName: Linux
  osVersion: 6.12.62+rpt-rpi-2712
  osArchitecture: aarch64
  availableProcessors: 4
  freeMemory: 246294592
  totalMemory: 1076887552
  uptime: 15273
  startLevel: 100
addons:
  - automation-jsscripting
  - binding-amazonechocontrol
  - binding-astro
  - binding-avmfritz
  - binding-exec
  - binding-homematic
  - binding-http
  - binding-icalendar
  - binding-mail
  - binding-matter
  - binding-mqtt
  - binding-network
  - binding-ntp
  - binding-openweathermap
  - binding-sonos
  - binding-tr064
  - persistence-mapdb
  - persistence-rrd4j
  - transformation-basicprofiles
  - transformation-exec
  - transformation-jsonpath
  - transformation-map
  - transformation-regex
  - transformation-scale
  - transformation-xpath
  - transformation-xslt
  - ui-basic

Don’t know if I’m right here, but I got the following message, when using ā€œopenhabian-configā€ to upgrade all OS with ā€œOption 02ā€ at the end:

npm notice
npm notice New major version of npm available! 10.9.7 -> 11.12.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.12.1
npm notice To update run: npm install -g npm@11.12.1
npm notice

I then run the above command, but got the the error-message:

ohab@raspi58:~ $ sudo npm install -g npm@11.12.1
npm error code MODULE_NOT_FOUND
npm error Cannot find module 'promise-retry'
npm error Require stack:
npm error - /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
npm error - /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
npm error - /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/index.js
npm error - /usr/lib/node_modules/npm/node_modules/libnpmfund/lib/index.js
npm error - /usr/lib/node_modules/npm/lib/utils/reify-output.js
npm error - /usr/lib/node_modules/npm/lib/utils/reify-finish.js
npm error - /usr/lib/node_modules/npm/lib/commands/install.js
npm error - /usr/lib/node_modules/npm/lib/npm.js
npm error - /usr/lib/node_modules/npm/lib/cli/entry.js
npm error - /usr/lib/node_modules/npm/lib/cli.js
npm error - /usr/lib/node_modules/npm/bin/npm-cli.js
npm error A complete log of this run can be found in: /root/.npm/_logs/2026-04-10T11_11_22_636Z-debug-0.log
ohab@raspi58:

Is there anyone to help me solving this problem, as I’m a ā€œDummyā€, and don’t know what to do.

Thx in advance

Cheers - Peter

I think you just let openHABian manage npm for you. You do not need to run any commands manually. It’s likely that openHABian is still on an older verison of NPM. The fact that there’s a newer version is not by itself a reason openHABian would upgrade.

When openHABian is ready to move to a newer npm, they will include that as part of the upgrade for you.

Hello Rich,

thx for answering and help.

Along the same lines, I also get the npm notice, but in addition, an error:

2026-04-18_12:23:56_BST [openHABian] Checking for updates of openhab for JS Scripting... npm notice
npm notice New major version of npm available! 10.9.4 -> 11.12.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.12.1
npm notice To update run: npm install -g npm@11.12.1
npm notice
Update available... /opt/openhabian/functions/nodejs-apps.bash: line 380: [[: 5.: syntax error: invalid arithmetic operator (error token is ".")

UPDATING
2026-04-18_12:24:07_BST [openHABian] Installing openhab for JS Scripting... OK

This is using openHABian Configuration Tool — [main]{2026-04-14T23:38:44+02:00}(3bfc367c)
and openHAB 5.1.3

openHAB seems to be running OK. Has anyone else seen this?

That’s an error in openHABian. Please file an issue on the openHABian repo.

could you run the update again and tell me if the error is repeated?
I think the version comparison fails if the format of the version string is unexpected (it’s comparing numbers). But if it was updated anyway it might be solved?

Well I’m not running an ā€˜update’ as such, just running sudo openhabian-config.
When I run it now:

...
2026-04-25_15:07:25_BST [openHABian] Checking for updates of openhab for JS Scripting... npm notice
npm notice New major version of npm available! 10.9.7 -> 11.13.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.13.0
npm notice To update run: npm install -g npm@11.13.0
npm notice
No update available.
2026-04-25_15:07:25_BST [openHABian] Checking for updates of openhab_rules_tools for JS Scripting... No update available.
...

Because there is no update available, then line 380 of the bash script doesn’t run, so the error doesn’t appear.

So the update worked in spite of the error.
Not perfect but no severe problem

Yes the JS Scripting update worked. Should npm have been updated? If not it would be nice to suppress the message, so to avoid confusion for others.

npm is usually installed and updated with node. I wouldn’t update npm separately if it’s not necessary (which usually isn’t the case).
The message can be suppressed by setting an environment variable (NPM_CONFIG_UPDATE_NOTIFIER). You can try a PR.