0

I tried to install lsp-mode from MELPA, but get the following error message:

run-hooks: Cannot open load file: No such file or directory, lsp-mode

So I thought I'd upgrade my other packages and try again, but now when I try to upgrade my packages, I get the same error message. Furthermore, if I look into my elpa folder, I see lsp-mode folder full of contents. If I delete that folder and try the installation again, I get the same message and the folder re-appears. Furthermore, I find a command lsp among the available commands, but if I execute it, it gives the same error message. What do I do now?

2 Answers 2

1

Use toggle-debug-on-error to get a backtrace when the error happens. Use that to find the broken hook function. Remove the broken hook function from whatever hook was being run at the time.

1
  • I used toggle-backtrace-on-error and got a message it enabled the mode globally, then tried installing again, but I still didn't get a backtrace. Can I get a backtrace specifically for that command, regardless of if it throws an error (because I think Emacs doesn't count the message as an error or something). Commented Apr 17 at 16:08
0

I found out the problem: for some reason a required lsp-mode file was not loaded when lsp-mode was called. Everything seems to work when that file is loaded manually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.