How to do a hard reset / re-import from GitHub

I just ran into a problem where I was getting an opaque error about sqlite3 and doing a fresh import from GitHub wasn’t helping. I knew the code at GitHub was fine because it worked when imported into a fresh Glitch project. So there was something hanging around in the filesystem somehow that was messing it up and I wanted to start from scratch as if creating a new project, but keep my current project name.

Here’s what finally worked:

  1. Save a copy of the .env file – the one thing not in GitHub
  2. Go to the Glitch terminal and do rm -rf * and rm -rf .*
  3. Do another import from GitHub
  4. Create a new file .env
  5. Paste in the contents of it from step 1

You’re welcome future self searching the Glitch forum for how I solved this last time.

(I believe there’s a much simpler solution, like doing “npm reinstall” or some such incantation but I failed to figure it out so I’m recording this nuclear option for posterity.)


Keywords: blow away everything and start fresh, start from scratch with reimport from GitHub, blow everything away, rebuild from nothing, turn it off and on again, wipe clean and start over, other things I might search for next time I have this problem, …

Yea you’re right, if your sqlite is not working correctly you’ll most likely want to rebuild the native libraries (for speed), by running either npm rebuild sqlite3 or if you’re using an older packaeg npm rebuild sqlite

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.