Read the statement by Michael Teeuw here.
Error EBADENGINE when installing MM v2.28.0
-
Hello!
I have issues updating my MagicMirror to the current version 2.28.0.When I run npm install I get this error message:
mirror@raspberrypi:~/MagicMirror $ sudo npm run install-mm > magicmirror@2.28.0 install-mm > npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev npm error code EBADENGINE npm error engine Unsupported engine npm error engine Not compatible with your version of node/npm: magicmirror@2.28.0 npm error notsup Not compatible with your version of node/npm: magicmirror@2.28.0 npm error notsup Required: {"node":">=20"} npm error notsup Actual: {"npm":"10.8.1","node":"v18.17.1"} npm error A complete log of this run can be found in: /root/.npm/_logs/2024-08-04T16_49_26_116Z-debug-0.log
seems easy to solve, but I absolutely fail to bring my node to the required version.
using nvm current I get this answer:
mirror@raspberrypi:~/MagicMirror $ nvm current v20.16.0
Edit: this is what happens if I try and install node via n:
mirror@raspberrypi:~ $ sudo n lts installing : node-v20.16.0 mkdir : /usr/local/n/versions/node/20.16.0 fetch : https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-arm64.tar.xz copying : node/20.16.0 /usr/bin/n: Zeile 746: /usr/local/bin/node: Datei oder Verzeichnis nicht gefunden installed : (with npm 10.8.1)
so it should work… PLEASE help!
-
@Ix ONE… NEVER EVER use sudo for MM commands, EVER…
once you do that then you HAVE to use SUDO for a lot of things you don’t want to give root permissions
note node and npm are not MM commands
SO, you had to upgrade node and npm for this release BEFORE doing the upgrade
see https://forum.magicmirror.builders/topic/18836/v2-28-0OR, you could have run the upgrade command from my scripts repo
see https://github.com/sdetweil/MagicMirror_scriptsfor node version, check (not what nvm thinks)
node -vmy scripts use the tool n, which is nvm written in javascript…
-
first: thanks for answering so fast!
node -v gives this:
mirror@raspberrypi:~ $ node -v v20.16.0
this is also the version I installed via n
nevertheless, the wrong version is recognized when trying npm i -
@Ix how about npm -v
-
mirror@raspberrypi:~ $ npm -v 10.8.1
-
-
@sdetweil said in Error EBADENGINE when installing MM v2.28.0:
npm run install-mm
mirror@raspberrypi:~/MagicMirror $ npm run install-mm > magicmirror@2.28.0 install-mm > npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev npm error code EBADENGINE npm error engine Unsupported engine npm error engine Not compatible with your version of node/npm: magicmirror@2.28.0 npm error notsup Not compatible with your version of node/npm: magicmirror@2.28.0 npm error notsup Required: {"node":">=20"} npm error notsup Actual: {"npm":"10.8.1","node":"v18.17.1"} npm error A complete log of this run can be found in: /root/.npm/_logs/2024-08-04T17_53_51_013Z-debug-0.log
-
@Ix said in Error EBADENGINE when installing MM v2.28.0:
/root/.npm/_logs/2024-08-04T17_53_51_013Z-debug-0.log
ok, it thinks you are running npm as root… probably cause of some sudo somwhere…
show results of
whoami cd ~/MagicMirror ls -laF
-
@sdetweil
whoamimirror@raspberrypi:~/MagicMirror $ whoami mirror
and ls in MM directory:
mirror@raspberrypi:~/MagicMirror $ ls -laF insgesamt 688 drwxr-xr-x 18 mirror mirror 4096 4. Aug 17:48 ./ drwxr-xr-x 26 mirror mirror 4096 3. Jul 09:30 ../ -rw-r--r-- 1 mirror mirror 83743 4. Aug 17:48 CHANGELOG.md drwxr-xr-x 2 mirror mirror 4096 3. Apr 17:11 clientonly/ -rw-r--r-- 1 mirror mirror 1617 3. Apr 17:11 Collaboration.md drwxr-xr-x 2 mirror mirror 4096 4. Aug 17:48 config/ drwxr-xr-x 2 mirror mirror 4096 3. Apr 17:11 css/ -rw-r--r-- 1 mirror mirror 10244 2. Jul 21:56 .DS_Store -rw-r--r-- 1 mirror mirror 238 2. Okt 2023 .editorconfig -rw-r--r-- 1 mirror mirror 27 3. Apr 17:11 .eslintignore -rw-r--r-- 1 mirror mirror 3020 3. Apr 17:11 .eslintrc.json drwxr-xr-x 3 mirror mirror 4096 4. Aug 17:48 fonts/ drwxr-xr-x 8 mirror mirror 4096 4. Aug 20:28 .git/ -rw-r--r-- 1 mirror mirror 1034 2. Okt 2023 .gitattributes drwxr-xr-x 3 mirror mirror 4096 3. Apr 17:11 .github/ -rw-r--r-- 1 mirror mirror 1140 3. Apr 17:11 .gitignore drwxr-xr-x 3 mirror mirror 4096 3. Apr 17:11 .husky/ -rw-r--r-- 1 mirror mirror 3103 2. Okt 2023 index.html drwxr-xr-x 2 mirror mirror 4096 4. Aug 19:18 installers/ -rw-r--r-- 1 mirror mirror 1096 2. Okt 2023 jest.config.js drwxr-xr-x 2 mirror mirror 4096 4. Aug 17:48 js/ -rw-r--r-- 1 mirror mirror 264 2. Okt 2023 jsconfig.json -rw-r--r-- 1 mirror mirror 1098 3. Apr 17:11 LICENSE.md -rw-r--r-- 1 mirror mirror 6947 3. Apr 17:11 mm2.png drwxr-xr-x 13 mirror mirror 4096 3. M?r 11:49 modules/ -rw-r--r-- 1 mirror mirror 1130 2. Okt 2023 module-types.ts drwxr-xr-x 414 root root 28672 3. Apr 17:16 node_modules/ -rw-r--r-- 1 mirror mirror 48 3. Apr 17:11 .npmrc -rw-r--r-- 1 mirror mirror 3694 4. Aug 17:48 package.json -rw-r--r-- 1 mirror mirror 414176 4. Aug 17:48 package-lock.json -rw-r--r-- 1 mirror mirror 96 3. Apr 17:11 .prettierignore -rw-r--r-- 1 mirror mirror 29 2. Okt 2023 .prettierrc.json -rw-r--r-- 1 mirror mirror 3279 3. Apr 17:11 README.md drwxr-xr-x 2 mirror mirror 4096 3. Apr 17:11 serveronly/ drwxr-xr-x 2 mirror mirror 4096 2. Okt 2023 splashscreen/ -rw-r--r-- 1 mirror mirror 126 2. Okt 2023 .stylelintrc.json drwxr-xr-x 8 mirror mirror 4096 4. Jan 2024 tests/ drwxr-xr-x 2 mirror mirror 4096 3. Apr 17:11 translations/ drwxr-xr-x 4 mirror mirror 4096 4. Aug 17:48 vendor/
-
@Ix said in Error EBADENGINE when installing MM v2.28.0:
drwxr-xr-x 414 root root 28672 3. Apr 17:16 node_modules/
my only guess
SO, lets try
cd ~/MagicMirror # using sudo here only to remove the root owned folder sudo rm -rf node_modules npm run install-mm