ProxmoxVE: Zigbee2MQTT LXC cannot be created

✅ Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Zigbee2MQTT

📂 What was the exact command used to execute the script?

bash -c “$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zigbee2mqtt.sh)”

📝 Provide a clear and concise description of the issue.

Since the Release of Zigbee2MQTT 2.0.0 today, no Zigbee2MQTT LXCs can be created or updated.

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

🔄 Steps to reproduce the issue.

Run the install script

❌ Paste the full error output (if available).

✔️ Installed Node.js ⠋Cloning into ‘/opt/zigbee2mqtt’… ⠦remote: Enumerating objects: 143, done. remote: Counting objects: 100% (143/143), done. remote: Compressing objects: 100% (139/139), done. remote: Total 143 (delta 6), reused 76 (delta 1), pack-reused 0 (from 0) Receiving objects: 100% (143/143), 540.96 KiB | 3.98 MiB/s, done. Resolving deltas: 100% (6/6), done. ✔️ Set up Zigbee2MQTT Repository npm error code EUSAGE npm error npm error The npm ci command can only install with an existing package-lock.json or npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or npm error later to generate a package-lock.json file, then try again. npm error npm error Clean install a project npm error npm error Usage: npm error npm ci npm error npm error Options: npm error [–install-strategy <hoisted|nested|shallow|linked>] [–legacy-bundling] npm error [–global-style] [–omit <dev|optional|peer> [–omit <dev|optional|peer> …]] npm error [–include <prod|dev|optional|peer> [–include <prod|dev|optional|peer> …]] npm error [–strict-peer-deps] [–foreground-scripts] [–ignore-scripts] [–no-audit] npm error [–no-bin-links] [–no-fund] [–dry-run] npm error [-w|–workspace <workspace-name> [-w|–workspace <workspace-name> …]] npm error [-ws|–workspaces] [–include-workspace-root] [–install-links] npm error npm error aliases: clean-install, ic, install-clean, isntall-clean npm error npm error Run “npm help ci” for more info npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-03T21_45_53_474Z-debug-0.log ⠇ [ERROR] in line 45: exit code 0: while executing command $STD npm ci

🖼️ Additional context (optional).

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 46 (16 by maintainers)

Most upvoted comments

Quickfix tomorrow

And this can be Done by every user? Think bigger, not only for you.

@tomfrenzel @MickLesk confirmed. Update finally done

@snippem follow: #660 after step 4 mv your configuration.yaml and configuration.example.yaml to .bak step 5 run the updater two times after that mv your configuration.yaml.bak and configuration.example.yaml.bak

Running 2.0 now on the first instance i have of Z2M 😃

Followed the instruction and made some changes notes see:

1.) Install pnpm

npm install -g pnpm 2.) Do an Update of your config

systemctl stop zigbee2mqtt mkdir -p /opt/z2m_backup cp -r /opt/zigbee2mqtt/data/* /opt/z2m_backup 3.) Change Configuration of configuration yaml

nano /opt/zigbee2mqtt/data/configuration.yaml add here in the right sections:

advanced: homeassistant_legacy_entity_attributes: false homeassistant_legacy_triggers: false legacy_api: false legacy_availability_payload: fals device_options: legacy: false 4.) Check if your Adapter is correct configured (i had the same issue)

nano /opt/zigbee2mqtt/data/configuration.yaml check this part:

serial: port: /dev/ttyACM0 adapter: zstack # <-- Add this line ive used zstack, you can check it here: Koenkk/zigbee2mqtt#24364

Also this still works as a port:

⚙️ Determine the location of your adapter

ls -l /dev/serial/by-id

Example Output: lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> …/…/ttyUSB0

5.) mv your configuration.yaml and configuration.example.yaml to .bak

mv /opt/zigbee2mqtt/data/configuration.yaml /opt/zigbee2mqtt/data/configuration.yaml.bak mv /opt/zigbee2mqtt/data/configuration.example.yaml /opt/zigbee2mqtt/data/configuration.example.yaml.bak

6.) go into main path and enter “cd”

cd /opt/zigbee2mqtt ./update.sh

run the updater two times

Note when complaining about data-backup allready avaible delete it and run update command again. rm -r /opt/zigbee2mqtt/data-backup

run ./update.sh again

7.) Move back old configuration files.

mv /opt/zigbee2mqtt/data/configuration.yaml.bak /opt/zigbee2mqtt/data/configuration.yaml mv /opt/zigbee2mqtt/data/configuration.example.yaml.bak /opt/zigbee2mqtt/data/configuration.example.yaml

8.) if all is correctly deployed, you can do an testrun

cd /opt/zigbee2mqtt && pnpm start => if it works, fine, update done

9.) Edit Service for Zigbee2MQTT

nano /etc/systemd/system/zigbee2mqtt.service change “/usr/bin/npm start” to “/usr/bin/pnpm start” In ExecStart and start the service

systemctl daemon-reload systemctl start zigbee2mqtt 10.) Create an App_version.txt for next updates

touch /opt/zigbee2mqtt_version.txt nano /opt/zigbee2mqtt_version.txt => add 2.0.0 in file and save

The only thing i run into fornow is normally i run update in the root but i get an error:

Shutting down Zigbee2MQTT… Generating a backup of the configuration… Checking if any changes were made to package-lock.json… error: pathspec ‘package-lock.json’ did not match any file(s) known to git Failed to check package-lock.json.

@tomfrenzel @MickLesk confirmed. Update finally done

@snippem follow: https://github.com/community-scripts/ProxmoxVE/discussions/660 after step 4 mv your configuration.yaml and configuration.example.yaml to .bak step 5 run the updater two times after that mv your configuration.yaml.bak and configuration.example.yaml.bak

I’m doing a fresh install and receive this message. Am I lacking a resource?

image

DNS issue. You cant reach Github

Now both are fixed 👍🏽 Thanks!

Fixed

I had to edit it a little bit different:

9.) Edit Service for Zigbee2MQTT

nano /etc/systemd/system/zigbee2mqtt.service

change “/usr/bin/npm start” to “pnpm start” In ExecStart and start the service

Service wouldn’t start with /usr/bin Just FYI

Sorry if I duplicate it. Running Z2M as LXC in PVE (bash -c “$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt.sh)” ). When I hit “update” i get this:

Acquiring necessary components… npm error code EUSAGE npm error npm error The npm ci command can only install with an existing package-lock.json or npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or npm error later to generate a package-lock.json file, then try again. npm error npm error Clean install a project npm error npm error Usage: npm error npm ci npm error npm error Options: npm error [–install-strategy <hoisted|nested|shallow|linked>] [–legacy-bundling] npm error [–global-style] [–omit <dev|optional|peer> [–omit <dev|optional|peer> …]] npm error [–include <prod|dev|optional|peer> [–include <prod|dev|optional|peer> …]] npm error [–strict-peer-deps] [–foreground-scripts] [–ignore-scripts] [–no-audit] npm error [–no-bin-links] [–no-fund] [–dry-run] npm error [-w|–workspace <workspace-name> [-w|–workspace <workspace-name> …]] npm error [-ws|–workspaces] [–include-workspace-root] [–install-links] npm error npm error aliases: clean-install, ic, install-clean, isntall-clean npm error npm error Run “npm help ci” for more info npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-05T09_49_48_569Z-debug-0.log Failed to install necessary components.

When I start new instance from this link (https://community-scripts.github.io/ProxmoxVE/scripts?id=zigbee2mqtt) I get this.

🚀 Creating a Zigbee2MQTT LXC using the above advanced settings ✔️ Using local for Template Storage. ✔️ Using local-lvm for Container Storage. ✔️ Updated LXC Template List ✔️ LXC Container 110 was successfully created. ✔️ Started LXC Container bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) ✔️ Set up Container OS ✔️ Network Connected: 192.168.11.103 ✔️ IPv4 Internet Connected ✖️ IPv6 Internet Not Connected ✔️ DNS Resolved github.com to 140.82.121.4 ✔️ Updated Container OS ✔️ Installed Dependencies ✔️ Set up Node.js Repository ✔️ Installed Node.js ✔️ Set up Zigbee2MQTT Repository ⠸ Installing Zigbee2MQTT [ERROR] in line 44: exit code 0: while executing command “$@” > /dev/null 2>&1

what is recommended to proceed?

You see the wrong Repo, right? And you see the instruction above, right?

Sorry if I duplicate it. Running Z2M as LXC in PVE (bash -c “$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt.sh)” ). When I hit “update” i get this:

Acquiring necessary components… npm error code EUSAGE npm error npm error The npm ci command can only install with an existing package-lock.json or npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or npm error later to generate a package-lock.json file, then try again. npm error npm error Clean install a project npm error npm error Usage: npm error npm ci npm error npm error Options: npm error [–install-strategy <hoisted|nested|shallow|linked>] [–legacy-bundling] npm error [–global-style] [–omit <dev|optional|peer> [–omit <dev|optional|peer> …]] npm error [–include <prod|dev|optional|peer> [–include <prod|dev|optional|peer> …]] npm error [–strict-peer-deps] [–foreground-scripts] [–ignore-scripts] [–no-audit] npm error [–no-bin-links] [–no-fund] [–dry-run] npm error [-w|–workspace <workspace-name> [-w|–workspace <workspace-name> …]] npm error [-ws|–workspaces] [–include-workspace-root] [–install-links] npm error npm error aliases: clean-install, ic, install-clean, isntall-clean npm error npm error Run “npm help ci” for more info npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-05T09_49_48_569Z-debug-0.log Failed to install necessary components.

When I start new instance from this link (https://community-scripts.github.io/ProxmoxVE/scripts?id=zigbee2mqtt) I get this.

🚀 Creating a Zigbee2MQTT LXC using the above advanced settings ✔️ Using local for Template Storage. ✔️ Using local-lvm for Container Storage. ✔️ Updated LXC Template List ✔️ LXC Container 110 was successfully created. ✔️ Started LXC Container bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) ✔️ Set up Container OS ✔️ Network Connected: 192.168.11.103 ✔️ IPv4 Internet Connected ✖️ IPv6 Internet Not Connected ✔️ DNS Resolved github.com to 140.82.121.4 ✔️ Updated Container OS ✔️ Installed Dependencies ✔️ Set up Node.js Repository ✔️ Installed Node.js ✔️ Set up Zigbee2MQTT Repository ⠸ Installing Zigbee2MQTT [ERROR] in line 44: exit code 0: while executing command “$@” > /dev/null 2>&1

what is recommended to proceed?

You need the bash of PR, its for now only in Develop Branch. Only the “update” function is against the Main Branch

I don’t quite understand what you mean I guess. I’m running the production version of zigbee2mqtt not the development version. Shouldn’t I get the error now? Or do you mean that the manual installation of Z2M 2.00 only works now and not the standard update command? until the update script is updated to Z2M 2.00?

Read this and execute this bash https://github.com/community-scripts/ProxmoxVE/pull/1221

Just run the update script again. Not sure why this is happening but it worked for me 👍🏽

need some testers, check PR