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.

    Merge conflict detected in your package.json

    Scheduled Pinned Locked Moved Solved Troubleshooting
    19 Posts 3 Posters 3.1k 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.
    • D Offline
      docransom @sdetweil
      last edited by

      log file from error:

      0 verbose cli /usr/bin/node /usr/bin/npm
      1 info using npm@9.6.7
      2 info using node@v18.17.1
      3 timing npm:load:whichnode Completed in 4ms
      4 timing config:load:defaults Completed in 6ms
      5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 6ms
      6 timing config:load:builtin Completed in 7ms
      7 timing config:load:cli Completed in 6ms
      8 timing config:load:env Completed in 1ms
      9 timing config:load:file:/home/hamonation/MagicMirror/.npmrc Completed in 6ms
      10 timing config:load:project Completed in 8ms
      11 timing config:load:file:/home/hamonation/.npmrc Completed in 0ms
      12 timing config:load:user Completed in 2ms
      13 timing config:load:file:/usr/etc/npmrc Completed in 0ms
      14 timing config:load:global Completed in 1ms
      15 timing config:load:setEnvs Completed in 3ms
      16 timing config:load Completed in 36ms
      17 timing npm:load:configload Completed in 36ms
      18 timing npm:load:mkdirpcache Completed in 1ms
      19 timing npm:load:mkdirplogs Completed in 2ms
      20 verbose title npm start
      21 verbose argv "start"
      22 timing npm:load:setTitle Completed in 3ms
      23 timing config:load:flatten Completed in 10ms
      24 timing npm:load:display Completed in 13ms
      25 verbose logfile logs-max:10 dir:/home/hamonation/.npm/_logs/2023-10-02T21_06_09_813Z-
      26 verbose logfile /home/hamonation/.npm/_logs/2023-10-02T21_06_09_813Z-debug-0.log
      27 timing npm:load:logFile Completed in 37ms
      28 timing npm:load:timers Completed in 0ms
      29 timing npm:load:configScope Completed in 0ms
      30 timing npm:load Completed in 99ms
      31 timing command:run-script Completed in 21ms
      32 timing command:start Completed in 77ms
      33 verbose stack JSONParseError: Unexpected token "<" (0x3C) in JSON at position 26 while parsing near "...me\": >
      33 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json-fast/lib/index.js:7:61
      33 verbose stack     at async RunScript.run (/usr/lib/node_modules/npm/lib/commands/run-script.js:73:19)
      33 verbose stack     at async module.exports (/usr/lib/node_modules/npm/lib/cli.js:89:5)
      34 verbose cwd /home/hamonation/MagicMirror
      35 verbose Linux 6.1.21-v8+
      36 verbose node v18.17.1
      37 verbose npm  v9.6.7
      38 error code EJSONPARSE
      39 error path /home/hamonation/MagicMirror/package.json
      40 error Merge conflict detected in your package.json.
      40 error
      40 error Please resolve the package.json conflict and retry.
      41 verbose exit 1
      42 timing npm Completed in 239ms
      43 verbose code 1
      44 error A complete log of this run can be found in: /home/hamonation/.npm/_logs/2023-10-02T21_06_09_813Z-debug-0>
      
      
      

      package.json:

      {
              "name": "magicmirror",
      <<<<<<< HEAD
              "version": "2.25.0",
      =======
              "version": "2.23.0",
      >>>>>>> parent of e87f50e6 (Release 2.24.0 (#3141))
              "description": "The open source modular smart mirror platform.",
              "main": "js/electron.js",
              "scripts": {
                      "start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
                      "start:dev": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js dev",
                      "server": "node ./serveronly",
                      "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=>
                      "install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error --n>
                      "postinstall": "npm run install-vendor && npm run install-fonts && echo \"MagicMirror² installati>
                      "test": "NODE_ENV=test jest -i --forceExit",
                      "test:coverage": "NODE_ENV=test jest --coverage -i --verbose false --forceExit",
                      "test:electron": "NODE_ENV=test jest --selectProjects electron -i --forceExit",
                      "test:e2e": "NODE_ENV=test jest --selectProjects e2e -i --forceExit",
                      "test:unit": "NODE_ENV=test jest --selectProjects unit",
                      "test:prettier": "prettier . --check",
                      "test:js": "eslint 'js/**/*.js' 'modules/default/**/*.js' 'clientonly/*.js' 'serveronly/*.js' 'tr>
                      "test:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --c>
                      "test:calendar": "node ./modules/default/calendar/debug.js",
                      "config:check": "node js/check_config.js",
                      "lint:prettier": "prettier . --write",
                      "lint:js": "eslint 'js/**/*.js' 'modules/default/**/*.js' 'clientonly/*.js' 'serveronly/*.js' 'tr>
                      "lint:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --c>
                      "lint:staged": "lint-staged",
                      "prepare": "[ -f node_modules/.bin/husky ] && husky install || echo no husky installed."
              },
              "repository": {
                      "type": "git",
                      "url": "git+https://github.com/MichMich/MagicMirror.git"
              },
              "keywords": [
                      "magic mirror",
                      "magicmirror",
                      "smart mirror",
                      "mirror UI",
                      "modular"
              ],
              "author": "Michael Teeuw",
              "contributors": [
                      "https://github.com/MichMich/MagicMirror/graphs/contributors"
              ],
              "license": "MIT",
              "bugs": {
                      "url": "https://github.com/MichMich/MagicMirror/issues"
              },
              "homepage": "https://magicmirror.builders",
              "devDependencies": {
      <<<<<<< HEAD
                      "eslint-config-prettier": "^9.0.0",
                      "eslint-plugin-import": "^2.28.1",
                      "eslint-plugin-jest": "^27.4.2",
                      "eslint-plugin-jsdoc": "^46.8.2",
                      "eslint-plugin-prettier": "^5.0.0",
      
                      "express-basic-auth": "^1.2.1",
                      "husky": "^8.0.3",
                      "jest": "^29.7.0",
                      "jsdom": "^22.1.0",
                      "lint-staged": "^14.0.1",
                      "lodash": "^4.17.21",
                      "playwright": "^1.38.1",
                      "prettier": "^3.0.3",
                      "sinon": "^16.0.0",
                      "stylelint": "^15.10.3",
                      "stylelint-config-standard": "^34.0.0",
                      "stylelint-prettier": "^4.0.2",
                      "suncalc": "^1.9.0"
              },
              "optionalDependencies": {
                      "electron": "^26.2.4"
              },
              "dependencies": {
                      "colors": "^1.4.0",
                      "console-stamp": "^3.1.2",
                      "envsub": "^4.1.0",
                      "eslint": "^8.50.0",
                      "express": "^4.18.2",
                      "express-ipfilter": "^1.3.1",
                      "feedme": "^2.0.2",
                      "helmet": "^7.0.0",
                      "html-to-text": "^9.0.5",
      =======
                      "eslint-config-prettier": "^8.8.0",
                      "eslint-plugin-import": "^2.27.5",
                      "eslint-plugin-jest": "^27.2.1",
                      "eslint-plugin-jsdoc": "^40.1.0",
                      "eslint-plugin-prettier": "^4.2.1",
                      "express-basic-auth": "^1.2.1",
                      "husky": "^8.0.3",
                      "jest": "^29.5.0",
                      "jsdom": "^21.1.1",
                      "lodash": "^4.17.21",
                      "playwright": "^1.32.1",
                      "prettier": "^2.8.7",
                      "pretty-quick": "^3.1.3",
                      "sinon": "^15.0.2",
                      "stylelint": "^15.3.0",
                      "stylelint-config-standard": "^31.0.0",
                      "stylelint-prettier": "^3.0.0",
                      "suncalc": "^1.9.0"
              },
      
              "optionalDependencies": {
                      "electron": "^22.3.4"
              },
              "dependencies": {
                      "colors": "^1.4.0",
                      "console-stamp": "^3.1.1",
                      "digest-fetch": "^2.0.1",
                      "envsub": "^4.1.0",
                      "eslint": "^8.36.0",
                      "express": "^4.18.2",
                      "express-ipfilter": "^1.3.1",
                      "feedme": "^2.0.2",
                      "helmet": "^6.0.1",
      >>>>>>> parent of e87f50e6 (Release 2.24.0 (#3141))
                      "iconv-lite": "^0.6.3",
                      "luxon": "^1.28.1",
                      "module-alias": "^2.2.2",
                      "moment": "^2.29.4",
      <<<<<<< HEAD
                      "node-ical": "^0.16.1",
                      "socket.io": "^4.7.2"
              },
              "lint-staged": {
                      "*": "prettier --write",
                      "*.js": "eslint",
                      "*.css": "stylelint"
      =======
                      "node-fetch": "^2.6.9",
                      "node-ical": "^0.16.0",
                      "socket.io": "^4.6.1"
      >>>>>>> parent of e87f50e6 (Release 2.24.0 (#3141))
              },
              "_moduleAliases": {
                      "node_helper": "js/node_helper.js",
                      "logger": "js/logger.js"
              },
              "engines": {
      <<<<<<< HEAD
                      "node": ">=18"
      =======
                      "node": ">=14"
      >>>>>>> parent of e87f50e6 (Release 2.24.0 (#3141))
              }
      }
      
      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @docransom
        last edited by sdetweil

        @docransom thanks. weird

        see this
        https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line

        but for you the simple explanation

        edit the package.json file

        find the line with ======
        delete that line thru the line with >>>>>>>>

        repeat til all are gone

        go back to top
        delete all lines with
        <<<<<<<<<

        save the file

        git add package.json
        git commit -m " save new"

        the git commit may require you to identify yourself
        | updated
        git config --local user.name ??? <----your name
        git config --local user.email ??? <----your email

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        G 1 Reply Last reply Reply Quote 0
        • G Offline
          Guku @sdetweil
          last edited by

          @sdetweil Hi, so i had the same issue and after running the commands i get this

          MagicMirror $ git commit -m"save new"
          U package-lock.json
          error: Committing is not possible because you have unmerged files.
          hint: Fix them up in the work tree, and then use ‘git add/rm ’
          hint: as appropriate to mark resolution and make a commit.
          Thanks

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @Guku
            last edited by

            @Guku i hate package-lock.json… should NEVER be shipped…

            its used in the test env to get the right level of code, but we have SO many platforms, that the lock file is garbage…

            anyhow

            cd ~/MagicMirror
            git checkout package-lock.json
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            G 1 Reply Last reply Reply Quote 0
            • G Offline
              Guku @sdetweil
              last edited by

              @sdetweil just more errors…

              /MagicMirror $ git checkout package-lock.json
              error: path ‘package-lock.json’ is unmerged
              i just started fresh with version 2.25 few months ago and this is the 1st update, how are things go wrong so quickly? the old build i had for few years without and issue.

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @Guku
                last edited by

                @Guku rm package-lock.json

                to erase it

                my upgrade script handles this for you

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                G 1 Reply Last reply Reply Quote 0
                • G Offline
                  Guku @sdetweil
                  last edited by

                  @sdetweil said in Merge conflict detected in your package.json:

                  rm package-lock.json

                  ran your upgrade script and now see this

                  MagicMirror $ npm run server
                  npm ERR! code EJSONPARSE
                  npm ERR! JSON.parse Invalid package.json: JSONParseError: Expected double-quoted property name in JSON at position 3552 while parsing ‘{
                  npm ERR! JSON.parse “name”: “magicmirror”,
                  npm ERR! JSON.parse “version”: "2’
                  npm ERR! JSON.parse Failed to parse JSON data.
                  npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript.

                  npm ERR! A complete log of this run can be found in: /home/lolo/.npm/_logs/2024-01-01T18_11_41_122Z-debug-0.log

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @Guku
                    last edited by

                    @Guku did you use apply?

                    can u look at package.json too?

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    G 1 Reply Last reply Reply Quote 0
                    • G Offline
                      Guku @sdetweil
                      last edited by sdetweil

                      @sdetweil i did use apply at the end and here the file

                      {
                      	"name": "magicmirror",
                      	"version": "2.26.0",
                      	"description": "The open source modular smart mirror platform.",
                      	"main": "js/electron.js",
                      	"scripts": {
                      		"start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
                      		"start:dev": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js dev",
                      		"server": "node ./serveronly",
                      		"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",
                      		"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
                      		"postinstall": "npm run install-vendor && npm run install-fonts && echo \"MagicMirror² installation finished successfully! \n\"",
                      		"test": "NODE_ENV=test jest -i --forceExit",
                      		"test:coverage": "NODE_ENV=test jest --coverage -i --verbose false --forceExit",
                      		"test:electron": "NODE_ENV=test jest --selectProjects electron -i --forceExit",
                      		"test:e2e": "NODE_ENV=test jest --selectProjects e2e -i --forceExit",
                      		"test:unit": "NODE_ENV=test jest --selectProjects unit",
                      		"test:prettier": "prettier . --check",
                      		"test:js": "eslint 'js/**/*.js' 'modules/default/**/*.js' 'clientonly/*.js' 'serveronly/*.js' 'translations/*.js' 'vendor/*.js' 'tests/**/*.js' 'config/*'",
                      		"test:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --config .stylelintrc.json",
                      		"test:calendar": "node ./modules/default/calendar/debug.js",
                      		"config:check": "node js/check_config.js",
                      		"lint:prettier": "prettier . --write",
                      		"lint:js": "eslint 'js/**/*.js' 'modules/default/**/*.js' 'clientonly/*.js' 'serveronly/*.js' 'translations/*.js' 'vendor/*.js' 'tests/**/*.js' 'config/*' --fix",
                      		"lint:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --config .stylelintrc.json --fix",
                      		"lint:staged": "lint-staged",
                      		"prepare": "[ -f node_modules/.bin/husky ] && husky install || echo no husky installed."
                      	},
                      	"repository": {
                      		"type": "git",
                      		"url": "git+https://github.com/MichMich/MagicMirror.git"
                      	},
                      	"keywords": [
                      		"magic mirror",
                      		"magicmirror",
                      		"smart mirror",
                      		"mirror UI",
                      		"modular"
                      	],
                      	"author": "Michael Teeuw",
                      	"contributors": [
                      		"https://github.com/MichMich/MagicMirror/graphs/contributors"
                      	],
                      	"license": "MIT",
                      	"bugs": {
                      		"url": "https://github.com/MichMich/MagicMirror/issues"
                      	},
                      	"homepage": "https://magicmirror.builders",
                      	"devDependencies": {
                      		"@stylistic/eslint-plugin": "^1.5.1",
                      		"eslint-plugin-import": "^2.29.1",
                      		"eslint-plugin-jest": "^27.6.0",
                      		"eslint-plugin-jsdoc": "^46.9.1",
                      		"express-basic-auth": "^1.2.1",
                      		"husky": "^8.0.3",
                      		"jest": "^29.7.0",
                      		"jsdom": "^23.0.1",
                      		"lint-staged": "^15.2.0",
                      		"lodash": "^4.17.21",
                      		"playwright": "^1.40.1",
                      		"prettier": "^3.1.1",
                      		"sinon": "^17.0.1",
                      		"stylelint": "^16.1.0",
                      		"stylelint-config-standard": "^36.0.0",
                      		"stylelint-prettier": "^5.0.0",
                      		"suncalc": "^1.9.0"
                      	},
                      	"optionalDependencies": {
                      		"electron": "^27.2.0"
                      	},
                      	"dependencies": {
                      		"colors": "^1.4.0",
                      		"command-exists": "^1.2.9",
                      		"console-stamp": "^3.1.2",
                      		"envsub": "^4.1.0",
                      		"eslint": "^8.56.0",
                      		"express": "^4.18.2",
                      		"express-ipfilter": "^1.3.1",
                      		"feedme": "^2.0.2",
                      		"helmet": "^7.1.0",
                      		"html-to-text": "^9.0.5",
                      		"iconv-lite": "^0.6.3",
                      		"module-alias": "^2.2.3",
                      	},
                      	"lint-staged": {
                      		"*": "prettier --write",
                      		"*.js": "eslint",
                      		"*.css": "stylelint"
                      	},
                      	"_moduleAliases": {
                      		"node_helper": "js/node_helper.js",
                      		"logger": "js/logger.js"
                      	},
                      	"engines": {
                      		"node": ">=18"
                      	}
                      }
                      
                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @Guku
                        last edited by

                        @Guku weird… missing some of file

                        cd ~/MagicMirror
                        git checkout package.json

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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