I just ran into this after changing my theme and clicking rebuild and restart... any idea how I get out of this state?

Update: After running npm install and ./nodebb build the error changed to:

Error: ENOENT: no such file or directory, open '/home/snarlynarwhal/nodebb/build/public/templates/footer.tpl' at Error (native)

Update/Solution: Running npm install nodebb-theme-<theme-you-want> then ./nodebb build then sudo systemctl restart nodebb fixed the issue.