Read the statement by Michael Teeuw here.
issues updating MMM-calendar EXT3
-
@JMac no
edited# put package-lock.json back to last git clone state git checkout package-lock.json # update the module git pull # rerun npm install with new code npm install
all in the module folder
# lines are comments and will be ignored if you copy paste that whole thing
-
@sdetweil I just encountered the same problem and followed your instructions in your last post. This did not fix the problem. I continue to get the same error
“your local changes to the following files would be overwritten by the merge: package-lock.json
please commit them or stash them before you merge.
Aborting.”Thoughts on what to do next?
Norb
-
@nschertz you ARE in the module folder, right?
editedcd ~/MagicMirror/modules/MMM-CalendarExt3 git checkout package-lock.json git pull npm install
right?
-
just for information, the real issue is the the lock file is included in the package, right?
-
@BKeyport and it gets updated by npm install
You can do npm ci
Which will ONLY install the EXACT versions listed in the lock file, even if it’s wrong for your system -
@sdetweil Correct. After executing “git reset package-lock.json”, I get the message “Unstaged changes after reset:
M package-lock.json”I then run git pull and get
pi@MagicMirror:~/MagicMirror/modules/MMM-CalendarExt3 $ git pullUpdating e93534d…5f276d4
error: Your local changes to the following files would be overwritten by merge:
package-lock.json
Please commit your changes or stash them before you merge.
Aborting -
@nschertz sorry, oops… wrong command!
git checkout package-lock.json
fixed the prior posts with note edited
-
to clarify… execute “git checkout package.json” instead of " git reset package.json" or execute “git checkout package.json” and " git reset package.json"?
-
@nschertz git checkout
restores it from the local source repo
git reset
removes it from the staged to be submitted as a changeI posted the checkout first, then a user posted reset and I blindly followed it…
my mistake -
oops meant to type
to clarify… execute “git checkout package-lock.json” instead of " git reset package-lock.json" or execute “git checkout package-lock.json” and " git reset package-lock.json"?