Closed git-tail-d closed 8 months ago
npm should not trigger any Problem after upgrade - but nodejs Updates can...
try npm rebuild
inside z2m Folder
I have the same issue. It is triggered with the initial build: npm run build npm rebuild doesn't help in this case.
quick & dirty: save your /data Folder inside /opt/zigbee2mqtt
do a complete fresh install and before starting copy back your /data Folder
please check if your file and folder rights are matching your desired User!
if using "zigbee" as User then
chown -R zigbee /opt/zigbee2mqtt - for User rights chgrp -R zigbee /opt/zigbee2mqtt - for Group right
even check your nodejs Version:
[10:56:57] root@apu:~# node -v
v18.17.1
it has to be minimum v16.x - older v12.x will not work anymore
thank you for the dast response.
npm -v v20.9.0
try npm rebuild inside z2m Folder not help like ddcbe wrote
i try the new install
node
Version
not npm
Version
what OS do you use?
Hello,
thank you for the advise. It work now again.
node -v v20.9.0
Raspberry Pi 4 Model B Rev 1.5 Debian GNU/Linux 11 (bullseye)
What i have done:
Copy the whole data folder deleted the folder /opt/zigbee2mqtt
sudo mkdir /opt/zigbee2mqtt sudo chown -R ${USER}: /opt/zigbee2mqtt
Clone Zigbee2MQTT repository git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
Install dependencies (as user "pi") cd /opt/zigbee2mqtt npm ci --maxsockets 1
backup the data folder sudo chown -R ${USER}: /opt/zigbee2mqtt/data
npm run build
npm start
Thank you for the advise
Best Regards
nice, always happy to help
For me, a reinstall did the trick. Thanks for the support!
Hello everybody. Yes, it really helps and I came to this myself, but it is not a complete solution, since now it has to be done with every update. And I can't switch between master and dev.
Homebridge Raspbian v1.0.39 - Raspberry Pi 3 Model B Plus Rev 1.3 npm -v 10.2.4 node -v v20.5.1
Hello,
i have now carried out the steps described above for the second time after another update was available and I cannot switch to the dev branch either.
But this is only on my productive system on which other programs and systems are running. This does not happen on a test system on which only a home automation system with z2m is running. I therefore assume that the combination with other program parts leads to this error. For example, npm is also used by homebridge.
I read in another thread that it was sufficient to just use git pull and npm run build. But I had to delete the complete directory and reinstall z2m.
What happened?
Hello,
i updated my Raspberry to the newest software versions and z2m not start with the error:
`npm start
Building Zigbee2MQTT... (initial build), failed Error: Command failed: npm run build Error: ENOENT: no such file or directory, open '/opt/zigbee2mqtt/dist/.hash' at Object.open (node:internal/fs/sync:78:18) at Object.openSync (node:fs:565:17) at Object.writeFileSync (node:fs:2288:35) at writeHash (/opt/zigbee2mqtt/index.js:38:8) at processTicksAndRejections (node:internal/process/task_queues:95:5)
` I tried to rollback z2m to 1.33.1 and 1.33.0 with the same errormessage.
In the older issues from 2020 was a solution to change the path to
But it also not work
Best Regards
What did you expect to happen?
z2m start as normal
How to reproduce it (minimal and precise)
No response
Zigbee2MQTT version
1.33.2
Adapter firmware version
no access to the frontend. the latest know firmware
Adapter
Conbee II
Debug log
No response