Attempting To Update
Attempting to update y MagicMirror and getting the following…0_1548302466116_3c1adce9-d2de-4ef9-963f-f6fa6ea1cea1-image.png
Can anyone help out here… this is my first time updating since I started playing with my pi last year.
Those files are auto created by the system, you can safely remove them.
rm package-lock.json rm vendor/package-lock.json
In order to update git requires that no local files have changes, that is what the error message means.
Those files should really be in a .gitignore file but that is another issues. Removing the files should solve your issue.
Those files should really be in a .gitignore file but that is another issues.
So why aren’t we putting them in? I still don’t really know what their purpose is.
@lavolp3 Because they are automatically generated files, you don’t include them in a repository.
package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json. It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.
This post is deleted!
@ultimatum22 tried what you said but got the following…
Your help is appreciated; am I using the correct command to update my MagicMirror
@kumartrd You just tried to remove the same file twice, that’s all. You’re almost there. Try:
cd ~/MagicMirror rm package-lock.json
And while I have you here… please use the Markdown features of the board in the future when posting code and error messages. Thanks.
you will also need to do this:
cd ~/MagicMirror/vendor rm package-lock.json
@justjim1220 He already got that one.
karsten13 last edited by
git pullcommand fails if files are locally changed, because the pull would override them.
git diffyou can see what has changed.
If you are not interested to save these local changes you can run
git reset --hard. This will revert all changes and after this the
git pullshould work.