• 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.

Cannot find module 'undici' - 'npm install' doesn't work

Scheduled Pinned Locked Moved Solved Troubleshooting
17 Posts 3 Posters 2.5k Views 3 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.
  • K Offline
    Klinge @sdetweil
    last edited by Feb 13, 2025, 3:34 PM

    @sdetweil Great, now it works.

    Thank you for your help again

    1 Reply Last reply Reply Quote 1
    • K Klinge has marked this topic as solved on Feb 13, 2025, 3:35 PM
    • T Offline
      tleo32
      last edited by Feb 17, 2025, 1:05 AM

      Hello - I am receiving a similar error and struggling to resolve. Does anyone have suggestions?

      npm error code EBADENGINE
      npm error engine Unsupported engine
      npm error engine Not compatible with your version of node/npm: magicmirror@2.30.0
      npm error notsup Not compatible with your version of node/npm: magicmirror@2.30.0
      npm error notsup Required: {“node”:“>=20.18.1 <21 || >=22”}
      npm error notsup Actual: {“npm”:“10.8.1”,“node”:“v20.16.0”}
      npm error A complete log of this run can be found in: /home/tleonetti/.npm/_logs/2025-02-17T00_47_21_325Z-debug-0.log

      S 1 Reply Last reply Feb 17, 2025, 1:09 AM Reply Quote 0
      • S Offline
        sdetweil @tleo32
        last edited by sdetweil Feb 17, 2025, 1:25 AM Feb 17, 2025, 1:09 AM

        @tleo32 yes, you didnt read the release notes. we need node 20.18.1 or above, not 21

        because you started manually, use my upgrade script w force as the parm instead of apply

        see https://github.com/sdetweil/MagicMirror_scripts
        also https://forum.magicmirror.builders/post/123993

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        T 1 Reply Last reply Feb 17, 2025, 7:57 PM Reply Quote 0
        • T Offline
          tleo32 @sdetweil
          last edited by Feb 17, 2025, 7:57 PM

          thank you for responding @sdetweil, for some reason not updating the node, please see below:

          update log will be in /home/tleonetti/MagicMirror/installers/upgrade.log
          doing test run = false
          Node currently installed. Checking version number.
          Minimum Node version: v20.18.1
          Installed Node version: v20.16.0
          installing correct version of node and npm, please wait
          Check current Node installation …
          Node currently installed. Checking version number.
          Minimum Node version: v20.18.1
          Installed Node version: v20.16.0
          Node should be upgraded.
          Installing Node.js …
          force: line 323: [: too many arguments
          tar (child): /home/tleonetti/node_release-.tar.gz: Cannot open: No such file or directory
          tar (child): Error is not recoverable: exiting now
          tar: Child returned status 2
          tar: Error is not recoverable: exiting now
          node version is
          Node.js installation Done! version=v20.16.0
          Check current NPM installation …
          NPM currently installed. Checking version number.
          Minimum npm version: V10.8.2
          Installed npm version: V10.8.1
          npm should be upgraded.
          Installing npm …
          npm installation Done! version=V10.8.1

          upgrading from version 2.30.0 to 2.30.0
          force: line 611: pm2: command not found
          fetching latest revisions
          updating MagicMirror runtime, please wait
          npm error code EBADENGINE
          npm error engine Unsupported engine
          npm error engine Not compatible with your version of node/npm: magicmirror@2.30.0
          npm error notsup Not compatible with your version of node/npm: magicmirror@2.30.0
          npm error notsup Required: {“node”:“>=20.18.1 <21 || >=22”}
          npm error notsup Actual: {“npm”:“10.8.1”,“node”:“v20.16.0”}
          npm error A complete log of this run can be found in: /home/tleonetti/.npm/_logs/2025-02-17T19_56_02_704Z-debug-0.log

          S 1 Reply Last reply Feb 17, 2025, 9:39 PM Reply Quote 0
          • S Offline
            sdetweil @tleo32
            last edited by sdetweil Feb 17, 2025, 9:51 PM Feb 17, 2025, 9:39 PM

            @tleo32 can you do this

            cd ~/MagicMirror
            curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash - &>somefile.txt
            

            and send me somefile.txt via email. same userid at gmail

            and then
            short fix

            sudo npm install n
            sudo n 20.18.1
            hash -r
            npm run install-MagicMirror
            

            please advise results

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            S 1 Reply Last reply Feb 17, 2025, 10:06 PM Reply Quote 0
            • S Offline
              sdetweil @sdetweil
              last edited by Feb 17, 2025, 10:06 PM

              @tleo32 I also pushed a fix, so, rerunning the upgrade with force should work…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Feb 18, 2025, 3:28 AM Reply Quote 0
              • S Offline
                sdetweil @sdetweil
                last edited by Feb 18, 2025, 3:28 AM

                he had nvm
                installed too, conflicts with n ( nodejs version of nvm)

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • 1
                • 2
                • 2 / 2
                2 / 2
                • First post
                  12/17
                  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