• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Need help to upgrade npm and node ...

Scheduled Pinned Locked Moved Unsolved Troubleshooting
5 Posts 2 Posters 789 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    MyMirror
    last edited by Oct 7, 2023, 10:54 AM

    Hi,

    after using sdetweil’s script to upgrade i get this on my raspi 3 and Buster:

    pi@MM3:~/MagicMirror $ bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply
    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut… Fertig
    Statusinformationen werden eingelesen… Fertig
    Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
      raspinfo
    Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
    Die folgenden Pakete werden ENTFERNT:
      nodejs*
    0 aktualisiert, 0 neu installiert, 1 zu entfernen und 0 nicht aktualisiert.
    Nach dieser Operation werden 185 MB Plattenplatz freigegeben.
    (Lese Datenbank ... 111709 Dateien und Verzeichnisse sind derzeit installiert.)
    Entfernen von nodejs (20.8.0-1nodesource1) ...
    dpkg: Warnung: Während Entfernens von nodejs ist Verzeichnis »/usr/lib/node_modules« nicht leer, wird daher nicht gelöscht
    Trigger für man-db (2.9.4-2) werden verarbeitet ...
    OK:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
    OK:2 http://archive.raspberrypi.org/debian bullseye InRelease
    Holen:3 http://giteduberger.fr rpimonitor/ InRelease [1.933 B]
    Es wurden 1.933 B in 2 s geholt (1.035 B/s).
    Paketlisten werden gelesen… Fertig
    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut… Fertig
    Statusinformationen werden eingelesen… Fertig
    ca-certificates ist schon die neueste Version (20210119).
    curl ist schon die neueste Version (7.74.0-1.3+deb11u7).
    gnupg ist schon die neueste Version (2.2.27-2+deb11u2).
    Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
      raspinfo
    Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
    0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
    deb [  signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main
    Holen:1 http://giteduberger.fr rpimonitor/ InRelease [1.933 B]
    OK:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease                                                                                      
    Holen:3 https://deb.nodesource.com/node_20.x nodistro InRelease [12,1 kB]                                                                             
    OK:4 http://archive.raspberrypi.org/debian bullseye InRelease                                                                                         
    Holen:5 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages [3.269 B]                                                                   
    Es wurden 17,3 kB in 6 s geholt (2.745 B/s).                                                                                                          
    Paketlisten werden gelesen… Fertig
    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut… Fertig
    Statusinformationen werden eingelesen… Fertig
    Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
      raspinfo
    Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
    Die folgenden NEUEN Pakete werden installiert:
      nodejs
    0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
    Es müssen noch 0 B von 27,8 MB an Archiven heruntergeladen werden.
    Nach dieser Operation werden 185 MB Plattenplatz zusätzlich benutzt.
    Vormals nicht ausgewähltes Paket nodejs wird gewählt.
    (Lese Datenbank ... 105887 Dateien und Verzeichnisse sind derzeit installiert.)
    Vorbereitung zum Entpacken von .../nodejs_20.8.0-1nodesource1_armhf.deb ...
    Entpacken von nodejs (20.8.0-1nodesource1) ...
    nodejs (20.8.0-1nodesource1) wird eingerichtet ...
    Trigger für man-db (2.9.4-2) werden verarbeitet ...
    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: v20.8.0
    Installed Node version: v19.2.0
    Node should be upgraded.
    Installing Node.js ...
    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut… Fertig
    Statusinformationen werden eingelesen… Fertig
    nodejs ist schon die neueste Version (20.8.0-1nodesource1).
    Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
      raspinfo
    Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
    0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
    node version is
    Node.js installation Done! version=v19.2.0
    apply: Zeile 245: [: Zu viele Argumente.
    Check current NPM installation ...
    NPM currently installed. Checking version number.
    Minimum npm version: V10.1.0
    Installed npm version: V8.19.3
    npm should be upgraded.
    Installing npm ...
    E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.
    npm WARN EBADENGINE Unsupported engine {
    npm WARN EBADENGINE   package: 'npm@1.4.29',
    npm WARN EBADENGINE   required: { node: '>=0.8', npm: '1' },
    npm WARN EBADENGINE   current: { node: 'v19.2.0', npm: '8.19.3' }
    npm WARN EBADENGINE }
    evalmachine.<anonymous>:41
    } = primordials;
        ^
    
    ReferenceError: primordials is not defined
        at evalmachine.<anonymous>:41:5
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
        at Module.load (node:internal/modules/cjs/loader:1081:32)
        at Module._load (node:internal/modules/cjs/loader:922:12)
        at Module.require (node:internal/modules/cjs/loader:1105:19)
        at require (node:internal/modules/cjs/helpers:103:18)
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
    
    Node.js v19.2.0
    npm installation Done! version=V
    
    apply: Zeile 353: [: -ge: Einstelliger (unärer) Operator erwartet.
    saving custom.css
    upgrading from version 2.23.0 to 2.25.0
    fetching latest revisions
    updating MagicMirror runtime, please wait
    apply: Zeile 593: [: -ge: Einstelliger (unärer) Operator erwartet.
    evalmachine.<anonymous>:41
    } = primordials;
        ^
    
    ReferenceError: primordials is not defined
        at evalmachine.<anonymous>:41:5
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
        at Module.load (node:internal/modules/cjs/loader:1081:32)
        at Module._load (node:internal/modules/cjs/loader:922:12)
        at Module.require (node:internal/modules/cjs/loader:1105:19)
        at require (node:internal/modules/cjs/helpers:103:18)
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
    
    Node.js v19.2.0
    Checking for modules with removed libraries
    processing dependency changes for active modules with package.json files
    
    processing for module MMM-MyWastePickup please wait
    ----------------------------------
    evalmachine.<anonymous>:41
    } = primordials;
        ^
    
    ReferenceError: primordials is not defined
        at evalmachine.<anonymous>:41:5
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
        at Module.load (node:internal/modules/cjs/loader:1081:32)
        at Module._load (node:internal/modules/cjs/loader:922:12)
        at Module.require (node:internal/modules/cjs/loader:1105:19)
        at require (node:internal/modules/cjs/helpers:103:18)
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
    
    Node.js v19.2.0
    processing complete for module MMM-MyWastePickup
    
    processing for module MMM-Fuel please wait
    ----------------------------------
    evalmachine.<anonymous>:41
    } = primordials;
        ^
    
    ReferenceError: primordials is not defined
        at evalmachine.<anonymous>:41:5
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
        at Module.load (node:internal/modules/cjs/loader:1081:32)
        at Module._load (node:internal/modules/cjs/loader:922:12)
        at Module.require (node:internal/modules/cjs/loader:1105:19)
        at require (node:internal/modules/cjs/helpers:103:18)
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
    
    Node.js v19.2.0
    processing complete for module MMM-Fuel
    
    restoring custom.css
    
    

    Asking for the installed npm version:

    pi@MM3:~/MagicMirror $ npm -v
    evalmachine.<anonymous>:41
    } = primordials;
        ^
    
    ReferenceError: primordials is not defined
        at evalmachine.<anonymous>:41:5
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
        at Module.load (node:internal/modules/cjs/loader:1081:32)
        at Module._load (node:internal/modules/cjs/loader:922:12)
        at Module.require (node:internal/modules/cjs/loader:1105:19)
        at require (node:internal/modules/cjs/helpers:103:18)
        at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
        at Module._compile (node:internal/modules/cjs/loader:1218:14)
    
    Node.js v19.2.0
    
    

    Ask for node version:

    pi@MM3:~/MagicMirror $ node -v
    v19.2.0
    
    

    Who can help to upgrade npm and node to the latest versions?
    Thanks!

    S 1 Reply Last reply Oct 7, 2023, 11:34 AM Reply Quote 0
    • S Away
      sdetweil @MyMirror
      last edited by Oct 7, 2023, 11:34 AM

      @MyMirror sadly the fixes for that problem remain unknown. something is incorrect in the apt data.
      even tho we told it to install node 20, it installed node 19 in your case.

      the only recovery that works is to rebuild your SD card

      use my backup/restore scripts to save and restore your mm setup.

      https://github.com/sdetweil/MagicMirror-backup-restore

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • M Offline
        MyMirror
        last edited by Oct 7, 2023, 12:17 PM

        Hi Sam,

        rebuild means to install all from the scratch and then make a restore (after backup now) with your script?

        BR
        Jens

        S 1 Reply Last reply Oct 7, 2023, 12:30 PM Reply Quote 0
        • S Away
          sdetweil @MyMirror
          last edited by sdetweil Oct 7, 2023, 12:30 PM Oct 7, 2023, 12:30 PM

          @MyMirror yes, rebuild the SD card. flash new os copy

          install mm w my script
          restore mm config from backup

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • M Offline
            MyMirror
            last edited by Oct 7, 2023, 4:08 PM

            Hi Sam,

            not nice, but if there’s no other way …
            Thanks for the info and your script.

            BR
            Jens

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              1/5
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy