zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Install failing - NPM errors?

Open umbrelleman opened this issue 1 year ago • 8 comments

What happened?

At the 'NPM CI' stage of install instructions, install never completes due to NPM error:

pi@pizigbee4:/opt/zigbee2mqtt $ sudo npm ci npm warn deprecated [email protected]: 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. npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported ⠼ npm error process terminated npm error signal SIGINT npm error A complete log of this run can be found in: /root/.npm/_logs/2024-10-02T20_19_34_668Z-debug-0.log

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

Fresh install on brand new Raspberry Pi 4 with NODE v20.17.0 and NPM v10.8.2

Zigbee2MQTT version

None

Adapter firmware version

None

Adapter

None

Setup

Raspberry Pi 4

Debug log

2024-10-02T20_19_34_668Z-debug-0.log.log

umbrelleman avatar Oct 02 '24 20:10 umbrelleman

https://github.com/Koenkk/zigbee2mqtt/issues/23238 😉

lux73 avatar Oct 03 '24 06:10 lux73

Does this mean I cannot actually install Zigbee2MQTT any more!?

umbrelleman avatar Oct 03 '24 12:10 umbrelleman

absolutely not - AFAIK you can safely ignore this, this modules are not used neither loaded by z2m

lux73 avatar Oct 03 '24 12:10 lux73

But the install fails, every time in the install it gets to

npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported ⠼

This takes about 5-10 minutes to eventually time out and it says

npm error process terminated npm error signal SIGINT

The install is not complete and it cannot be run?

umbrelleman avatar Oct 03 '24 12:10 umbrelleman

try updating nodejs to v22.x

[17:09:07] root@apu:~# node -v
v22.9.0

works for me

lux73 avatar Oct 03 '24 15:10 lux73

Looks like your system runs out of memory, try stopping other processes before executing it.

Koenkk avatar Oct 03 '24 18:10 Koenkk

Looks like your system runs out of memory, try stopping other processes before executing it.

Unfortunately this is on a brand new Raspberry Pi 4 with a fresh install and nothing else running?

umbrelleman avatar Oct 03 '24 19:10 umbrelleman

Hi, i'm having similar issue, after running npm ci on Raspberry Pi Zero 2 W after a few minutes ssh timeout and i cannot even ping the rpi. I have tried new sdcard, 32/64bit lite raspberry pi os, even with node v22.x but still nothing. Until the latest update it was working well. It started happening when i tried the update.

Okay i have figured it out. It does indeed run out of memory. I have increased the swap size from 200mb to 4GB and it completed in 3 minutes.

On RPI it is done by editing /etc/dphys-swapfile and increasing CONF_SWAPSIZE to value, and also if it is above 2048 change CONF_MAXSWAP to match CONF_SWAPSIZE.

Jozefik avatar Oct 03 '24 19:10 Jozefik

FYI I have just updated my system to V1.40.2 and installed OK with only the 2 depreciation warnings listed above by the author of the issue. Raspi 3B+ running

  • "Raspbian GNU/Linux 11 (bullseye)
  • Node.js v20.17.0
  • npm v10.8.2

Updated using CLI lines

cd /opt/zigbee2mqtt
./update.sh

WombatHollow avatar Oct 06 '24 02:10 WombatHollow

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days

github-actions[bot] avatar Dec 11 '24 00:12 github-actions[bot]