Project Rewind Error

When trying to rewind one of my projects, I get the following prompt:

Error rewinding: {"task":"Reverting to cc98a7dda9d3597aed18a04e75c2af84b3ccbae8","cmd":"git revert -n cc98a7dda9d3597aed18a04e75c2af84b3ccbae8..HEAD","code":128,"stdout":"","stderr":"error: The following untracked working tree files would be overwritten by merge:\n\t.config/configstore/update-notifier-npm.json\nPlease move or remove them before you can merge.\nAborting\n"}

I cannot for the life of me find any file with that path, even in console. Please help me because I REALLY need to rewind.

Hey JMGbaum,

If you’re comfortable sharing the project name, I’d be happy to take a look :slight_smile:

Best,
– Jude

new-new-mod-bot is the app name. Thanks for helping out!

Sure thing! Taking a look now…

I wasn’t able to reproduce the rewind trouble, so I put together a workaround for you using git.

Your steps are:

  1. open the glitch Console (it’s accessible inside of the logs pane)
  2. run this git command: git reset cc98a7dda9d3597aed18a04e75c2af84b3ccbae8
  3. run this command: refresh

Here’s a screenshot of what I did in the console:

If you check the editor, it’ll now be as if you performed a rewind targeting that changeset, ad you should be all set.

I performed those steps on a remix here: https://glitch.com/edit/#!/luminous-price

You can also manually pull your files over from that remix if you’d rather to do that than muck around in the console :slight_smile:

If you get a chance, could you please attach a screenshot if your Rewind timeline showing the spot that the rewind was failing on? That’ll help us reproduce and fix the bug.

I just manually re-added all the files that were lost, but now this error is showing in log:

Uncaught Exception:  OpenError: Corruption: no meta-nextfile entry in descriptor

    at /app/node_modules/levelup/lib/levelup.js:117:34

    at /app/node_modules/abstract-leveldown/abstract-leveldown.js:39:16

Hmm, that’s new. If you remove-and-restore the npm library it’s erroring about, it should reinstall the module for you.

How do I do that? (I’m not very experienced in console)

Thanks for the screenshot!

I’m playing in https://glitch.com/edit/#!/luminous-price?path=package.json:25:22 and it’s hard for me to see if things are ok or not, but here are my steps on cleaning up node_modules:

  1. open the console
  2. type cd node_modules
  3. type ls , make sure this is indeed the node modules folder (compare it to the picture):
  4. run rm -rf * ; this will delete all of the modules
  5. run ls again; you should now see that the modules are gone
  6. run refresh to see the the project reload the dependencies.

This fixed it, thanks!

1 Like

Awesome, glad to hear it!

I have a project with the same type of error. Would you like to use it to try and replicate the issue?

I worked around the since and I’ve backed up the file.

Project: ajar-wolverine

Attempted to rewind to 11/30/17

Error message:

Error rewinding: {"task":"Reverting to 2e51532747d715264a6f0be2e6bc160729f266fc","cmd":"git revert -n 2e51532747d715264a6f0be2e6bc160729f266fc..HEAD","code":128,"stdout":"","stderr":"error: The following untracked working tree files would be overwritten by merge:\n\t.bashrc\n\t.profile\nPlease move or remove them before you can merge.\nAborting\n"}

This issue is caused by a specific sequence of events. A checkpoint is created before a file exists - for example, your .bashrc wasn’t in the original project. Later that file is created, and gets committed in git. Some time after that, you add it to .gitignore and remove it from version control.

If you try to rewind to a revision that will change the file, you then get this message from git, because git isn’t tracking the file and doesn’t want you to lose data.

The easiest way to handle this is to rename the file to something else, rewind, and then rename it back. That will cause it to be committed, and then deleted in the next commit after you rename it back. If you don’t want it in your commit history, you can copy its contents, delete it, rewind, and readd the file.