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

Please commit your changes or stash them before you merge?

Scheduled Pinned Locked Moved Solved Troubleshooting
17 Posts 3 Posters 8.2k 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.
  • S Away
    sdetweil @jefftse
    last edited by Jan 3, 2025, 3:41 AM

    @jefftse

    1.NEVER use sudo when doing anything w MagicMirror files

    what is changed in package.json!

    git diff package.json

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    B J 2 Replies Last reply Jan 3, 2025, 3:43 AM Reply Quote 0
    • B Offline
      BKeyport Module Developer @sdetweil
      last edited by Jan 3, 2025, 3:43 AM

      @sdetweil Don’t NPM install touch the package.json - or is it just package-lock?

      Either way, @jefftse can just delete package-lock.json for that error.

      The "E" in "Javascript" stands for "Easy"

      S J 2 Replies Last reply Jan 3, 2025, 3:45 AM Reply Quote 0
      • S Away
        sdetweil @BKeyport
        last edited by Jan 3, 2025, 3:45 AM

        @BKeyport npm does not change package.json

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • J Offline
          jefftse @sdetweil
          last edited by Jan 3, 2025, 4:25 AM

          @sdetweil
          jeff@raspberrypi:~/MagicMirror $ git diff package.json
          diff --git a/package.json b/package.json
          index 7b80b4e…aa80952 100644
          — a/package.json
          +++ b/package.json
          @@ -58,6 +58,7 @@
          “ajv”: “^8.17.1”,
          “ansis”: “^3.3.2”,
          “console-stamp”: “^3.1.2”,

          •           "electron-version": "^2.0.1",
                      "envsub": "^4.1.0",
                      "eslint": "^9.11.1",
                      "express": "^4.21.0",
            

          @@ -66,13 +67,17 @@
          “helmet”: “^7.1.0”,
          “html-to-text”: “^9.0.5”,
          “iconv-lite”: “^0.6.3”,

          •           "luxon": "^3.5.0",
                      "module-alias": "^2.2.3",
                      "moment": "^2.30.1",
                      "node-ical": "0.18.0",
            
          •           "onoff": "^6.0.3",
                      "pm2": "^5.4.2",
            
          •           "rss-parser": "^3.13.0",
                      "socket.io": "^4.8.0",
                      "suncalc": "^1.9.0",
            
          •           "systeminformation": "^5.23.5"
            
          •           "systeminformation": "^5.23.5",
            
          •           "wiring-pi": "^2.2.1"
              },
              "devDependencies": {
                      "@eslint/js": "^9.11.1",
            
          1 Reply Last reply Reply Quote 0
          • J Offline
            jefftse @BKeyport
            last edited by Jan 3, 2025, 4:27 AM

            @BKeyport

            jeff@raspberrypi:~/MagicMirror $ rm package-lock.json
            jeff@raspberrypi:~/MagicMirror $ git pull && npm run install-mm
            Updating 94c3c69…c24de64
            error: Your local changes to the following files would be overwritten by merge:
            package.json
            Please commit your changes or stash them before you merge.
            Aborting

            S 1 Reply Last reply Jan 3, 2025, 12:37 PM Reply Quote 0
            • S Away
              sdetweil @jefftse
              last edited by Jan 3, 2025, 12:37 PM

              @jefftse

              cd ~/MagicMirror 
              git checkout package.json
              git pull
              

              if that is successful

              npm run mm-install
              

              but watch out, then sudo may have messed things uo

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              J 1 Reply Last reply Jan 3, 2025, 4:15 PM Reply Quote 0
              • J Offline
                jefftse @sdetweil
                last edited by Jan 3, 2025, 4:15 PM

                @sdetweil

                jeff@raspberrypi:~/MagicMirror $ npm run mm-install
                npm ERR! Missing script: “mm-install”
                npm ERR!
                npm ERR! Did you mean one of these?
                npm ERR! npm install # Install a package
                npm ERR! npm uninstall # Remove a package
                npm ERR!
                npm ERR! To see a list of scripts, run:
                npm ERR! npm run

                npm ERR! A complete log of this run can be found in: /home/jeff/.npm/_logs/2025-01-03T16_14_57_938Z-debug-0.log
                jeff@raspberrypi:~/MagicMirror $

                S 1 Reply Last reply Jan 3, 2025, 4:22 PM Reply Quote 0
                • S Away
                  sdetweil @jefftse
                  last edited by Jan 3, 2025, 4:22 PM

                  @jefftse nano package.json
                  version should be 2.30.0

                  "name": "magicmirror",
                  	"version": "2.30.0"
                  

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  J 1 Reply Last reply Jan 3, 2025, 4:38 PM Reply Quote 0
                  • J Offline
                    jefftse @sdetweil
                    last edited by Jan 3, 2025, 4:38 PM

                    @sdetweil

                    i’m confused. it is showing “2.30.0”

                    S 1 Reply Last reply Jan 3, 2025, 4:39 PM Reply Quote 0
                    • S Away
                      sdetweil @jefftse
                      last edited by sdetweil Jan 3, 2025, 4:40 PM Jan 3, 2025, 4:39 PM

                      @jefftse and further down

                      "scripts": {
                      		"config:check": "node js/check_config.js",
                      		"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
                      		"install-mm": "npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev",
                      		"install-mm:dev": "npm install --no-audit --no-fund --no-update-notifier",
                      		"install-vendor": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
                      

                      doah… my mistake…

                      npm run install-mm
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      J 3 Replies Last reply Jan 3, 2025, 4:44 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/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