Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.23k stars 1.69k forks source link

The tutorial does not allow node to work properly #22636

Open Almisuifre opened 6 months ago

Almisuifre commented 6 months ago

What happened?

I launched a fresh installation of raspbian. I followed the following tutorial. at some point, node tells me it’s installed, but then the bluid doesn’t work.

What did you expect to happen?

I expected the installation to be done correctly after reading the following tutorial: https://www.zigbee2mqtt.io/guide/installation/01_linux.html#optional-running-as-a-daemon-with-systemctl

How to reproduce it (minimal and precise)

Look at what’s happening in sma console:

$ sudo apt-get install -y nodejs git make g++ gcc libsystemd-dev make ... $ node --version v20.13.1 $ npm --version 10.5.2 $ sudo mkdir /opt/zigbee2mqtt $ sudo chown -R ${USER}: /opt/zigbee2mqtt $ git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt Cloning into '/opt/zigbee2mqtt'... remote: Enumerating objects: 155, done. remote: Counting objects: 100% (155/155), done. remote: Compressing objects: 100% (149/149), done. remote: Total 155 (delta 7), reused 56 (delta 2), pack-reused 0 Receiving objects: 100% (155/155), 555.92 KiB | 5.10 MiB/s, done. Resolving deltas: 100% (7/7), done.

$ cd /opt/zigbee2mqtt /opt/zigbee2mqtt $ npm ci added 796 packages, and audited 797 packages in 40s

86 packages are looking for funding run npm fund for details

found 0 vulnerabilities npm notice npm notice New minor version of npm available! 10.5.2 -> 10.7.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.7.0 npm notice Run npm install -g npm@10.7.0 to update! npm notice /opt/zigbee2mqtt $ npm run build

zigbee2mqtt@1.37.1 build tsc && node index.js writehash

/opt/zigbee2mqtt $ node-pre-gyp info ok -bash: node-pre-gyp: command not found $ npm audit npm ERR! code ENOLOCK npm ERR! audit This command requires an existing lockfile. npm ERR! audit Try creating one first with: npm i --package-lock-only npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file

npm ERR! A complete log of this run can be found in: /home/Domopiuser/.npm/_logs/2024-05-14T16_54_55_497Z-debug-0.log $ npm bug npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /home/Domopiuser/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/home/Domopiuser/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: /home/Domopiuser/.npm/_logs/2024-05-14T16_55_09_668Z-debug-0.log

Zigbee2MQTT version

1.22.1

Adapter firmware version

20211210

Adapter

lrwxrwxrwx 1 root root 13 May 14 18:39 usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_8c32f89eb6a4ed1191c3e9a32981d5c7-if00-port0 -> ../../ttyUSB0

Setup

MQTT, domoticz

Debug log

No response

wastez commented 6 months ago

I don’t see the connection to zigbee2mqtt, this problem is related to npm.

wastez commented 6 months ago

But just for you, bash doesn’t detect this command: node-pre-gyp

You have to look why, looks like it is not installed correctly but for this the information is to less.

Almisuifre commented 6 months ago

I ended up reinstalling and I don’t know why, this time, it’s going well.

I still notice that this phase is uncertain and would require more clarity and tests in the tutorials.

github-actions[bot] commented 2 weeks ago

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