Read the statement by Michael Teeuw here.
Error updating MM
-
Hi Everyone
My MM upgrade seems to have hit abit of a snag. Here is the log file after trying to update. The error I’m getting seems to be a little bit different to the other ones posted here (but root cause probably the same). Does anyone have any tips on how to get my MM running again?
pi@raspberrypi:~/MagicMirror/modules$ bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" force Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libc-ares2 libuv1 rpi-eeprom-images Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: nodejs* 0 upgraded, 0 newly installed, 1 to remove and 404 not upgraded. After this operation, 185 MB disk space will be freed. (Reading database ... 100567 files and directories currently installed.) Removing nodejs (20.8.0-1nodesource1) ... dpkg: warning: while removing nodejs, directory '/usr/lib/node_modules' not empty so not removed Processing triggers for man-db (2.8.5-2) ... Hit:1 http://archive.raspberrypi.org/debian buster InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done ca-certificates is already the newest version (20200601~deb10u2). curl is already the newest version (7.64.0-4+deb10u6). gnupg is already the newest version (2.2.12-1+rpi1+deb10u1). The following packages were automatically installed and are no longer required: libc-ares2 libuv1 rpi-eeprom-images Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 404 not upgraded. deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main Get:1 https://deb.nodesource.com/node_18.x nodistro InRelease [12.1 kB] Get:2 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages [5,267 B] Hit:3 http://archive.raspberrypi.org/debian buster InRelease Hit:4 http://raspbian.raspberrypi.org/raspbian buster InRelease Fetched 17.4 kB in 34s (507 B/s) Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libc-ares2 libuv1 rpi-eeprom-images Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: nodejs 0 upgraded, 1 newly installed, 0 to remove and 404 not upgraded. Need to get 0 B/26.8 MB of archives. After this operation, 177 MB of additional disk space will be used. Selecting previously unselected package nodejs. (Reading database ... 94745 files and directories currently installed.) Preparing to unpack .../nodejs_18.18.0-1nodesource1_armhf.deb ... Unpacking nodejs (18.18.0-1nodesource1) ... Setting up nodejs (18.18.0-1nodesource1) ... Processing triggers for man-db (2.8.5-2) ... doing test run = false update log will be in /home/pi/MagicMirror/installers/upgrade.log Check current Node installation ... Node currently installed. Checking version number. Minimum Node version: v18.18.0 Installed Node version: v16.11.1 Node should be upgraded. Installing Node.js ... gpg: WARNING: unsafe ownership on homedir '/home/pi/.gnupg' Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libc-ares2 libuv1 rpi-eeprom-images Use 'sudo apt autoremove' to remove them. The following packages will be upgraded: nodejs 1 upgraded, 0 newly installed, 0 to remove and 404 not upgraded. Need to get 0 B/27.0 MB of archives. After this operation, 5,819 kB of additional disk space will be used. apt-listchanges: Reading changelogs... (Reading database ... 100369 files and directories currently installed.) Preparing to unpack .../nodejs_20.5.1-deb-1nodesource1_armhf.deb ... Unpacking nodejs (20.5.1-deb-1nodesource1) over (18.18.0-1nodesource1) ... Setting up nodejs (20.5.1-deb-1nodesource1) ... Processing triggers for man-db (2.8.5-2) ... node version is Node.js installation Done! version=v16.11.1 force: line 240: [: too many arguments Check current NPM installation ... NPM currently installed. Checking version number. Minimum npm version: V9.8.1 Installed npm version: V8.0.0 npm should be upgraded. Installing npm ... E: Unable to correct problems, you have held broken packages. npm ERR! code EBADENGINE npm ERR! engine Unsupported engine npm ERR! engine Not compatible with your version of node/npm: npm@9.8.1 npm ERR! notsup Not compatible with your version of node/npm: npm@9.8.1 npm ERR! notsup Required: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} npm ERR! notsup Actual: {"npm":"8.0.0","node":"v16.11.1"} npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-10-04T14_24_00_147Z-debug.log npm installation Done! version=V8.0.0 saving custom.css upgrading from version 2.25.0 to 2.25.0 fetching latest revisions updating MagicMirror runtime, please wait npm ERR! code EBADENGINE npm ERR! engine Unsupported engine npm ERR! engine Not compatible with your version of node/npm: magicmirror@2.25.0 npm ERR! notsup Not compatible with your version of node/npm: magicmirror@2.25.0 npm ERR! notsup Required: {"node":">=18"} npm ERR! notsup Actual: {"npm":"8.0.0","node":"v16.11.1"} npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2023-10-04T14_24_06_797Z-debug.log Checking for modules with removed libraries processing dependency changes for active modules with package.json files
-
@kevmang said in Error updating MM:
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 404 not upgraded.
Need to get 0 B/26.8 MB of archives.
After this operation, 177 MB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database … 94745 files and directories currently installed.)
Preparing to unpack …/nodejs_18.18.0-1nodesource1_armhf.deb …
Unpacking nodejs (18.18.0-1nodesource1) …
Setting up nodejs (18.18.0-1nodesource1) …
Processing triggers for man-db (2.8.5-2) …yeh, thats interesting… says success and failure at the same time, but DID fail…
can u run this my itself
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/node20_install.sh)” -
@kevmang also, do these commands
nvm
and
nI wonder if there was a separate way to install node…
I know I use them at times…
-
@sdetweil Thanks for your advice. I’ve completely removed npm and node and that solved the errors when installing but MM still doesn’t appear. Here is the log from the install:
pi@raspberrypi:~$ bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: nodejs* 0 upgraded, 0 newly installed, 1 to remove and 401 not upgraded. After this operation, 177 MB disk space will be freed. (Reading database ... 100354 files and directories currently installed.) Removing nodejs (18.18.0-1nodesource1) ... dpkg: warning: while removing nodejs, directory '/usr/lib/node_modules' not empty so not removed Processing triggers for man-db (2.8.5-2) ... Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease Hit:2 http://archive.raspberrypi.org/debian buster InRelease Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done ca-certificates is already the newest version (20200601~deb10u2). curl is already the newest version (7.64.0-4+deb10u6). gnupg is already the newest version (2.2.12-1+rpi1+deb10u1). 0 upgraded, 0 newly installed, 0 to remove and 401 not upgraded. deb [ signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main Get:1 https://deb.nodesource.com/node_18.x nodistro InRelease [12.1 kB] Get:2 https://deb.nodesource.com/node_18.x nodistro/main armhf Packages [5,267 B] Hit:3 http://raspbian.raspberrypi.org/raspbian buster InRelease Hit:4 http://archive.raspberrypi.org/debian buster InRelease Fetched 17.4 kB in 1s (15.1 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: nodejs 0 upgraded, 1 newly installed, 0 to remove and 401 not upgraded. Need to get 0 B/26.8 MB of archives. After this operation, 177 MB of additional disk space will be used. Selecting previously unselected package nodejs. (Reading database ... 94730 files and directories currently installed.) Preparing to unpack .../nodejs_18.18.0-1nodesource1_armhf.deb ... Unpacking nodejs (18.18.0-1nodesource1) ... Setting up nodejs (18.18.0-1nodesource1) ... Processing triggers for man-db (2.8.5-2) ... doing test run = false update log will be in /home/pi/MagicMirror/installers/upgrade.log Check current Node installation ... Node currently installed. Checking version number. Minimum Node version: v18.18.0 Installed Node version: v18.18.0 No Node.js upgrade necessary. Check current NPM installation ... NPM currently installed. Checking version number. Minimum npm version: V9.8.1 Installed npm version: V9.8.1 No npm upgrade necessary. saving custom.css local version 2.25.0 already same as master 2.25.0 restoring custom.css
-
local version 2.25.0 already same as master 2.25.0
you need to use force on the upgrade command instead of apply
also, show the output of npm start
-
@sdetweil Thanks for the help! Used force to re-install MagicMirror again but still had an electron issue so I deleted the entier node_modules director as wel as the package_lock file and re-installed the modules. Then I had an error with MMM-MyCalendar which I fixed using the advice from here: https://github.com/jclarke0000/MMM-MyCalendar/issues/40
Most importantly everything works just fine now :) Thanks again!
-
@kevmang awesome,!!! thanks for the feedback
-
@kevmang Did you completely empty the node_modules folder? Did you have to run bash again from above?
And then you had to completely reinstall all the modules you previously had on it? -
@sil3ntstorm i make sudo rm -r /usr/lib/node_modules
then i used the upgrade-script
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)” apply.
the script above
bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/node20_install.sh)”
not work for me, error arch=: Zeile 1: “#!/bin/bash: Datei oder Verzeichnis nicht gefunden.after that i make npm install in the MagicMirror directory. Now all works fine for me