Installing on Ubuntu #13137
richardbrn
started this conversation in
General
Replies: 1 comment
-
To set proper permissions run: After that To run Zigbee2MQTT at startup, Follow the documentation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I am trying to install on a Ubuntu 22.04 box - I am not a linux person (mac os really) so this maybe a problem because I am not doing it right.
Basically, ubuntu is build and I log on as my user account (richard) and am running the install command as below...
sudo curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs git make g++ gcc
That works and node and npm give the right version numbers.
Then I do
sudo git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
And that works and downloads the files, and thenm it goes wrong!
if I then try
cd /opt/zigbee2mqtt
npm ci
I get the following output:
richard@homebridge:/opt$ npm ci
npm ERR! code EUSAGE
npm ERR!
npm ERR! The
npm ci
command can only install with an existing package-lock.json ornpm ERR! npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm ERR! later to generate a package-lock.json file, then try again.
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [--no-audit] [--foreground-scripts] [--ignore-scripts]
npm ERR! [--script-shell ]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info
npm ERR! A complete log of this run can be found in:
npm ERR! /home/richard/.npm/_logs/2022-07-13T19_19_42_174Z-debug-0.log
if I use sudo npm ci it works so it must be a permissions problem but not sure what or how to fix it.
Bascially, I need some real simple instrutions of how to get the npm ci to work, and then how to get the npm start command to run as service when the box reboots - any help would be greatly appreciated...
Thanks
Richard
Beta Was this translation helpful? Give feedback.
All reactions