Help for installation of org roam in windows

Just one last thing…

I tried desktop-save-mode by adding (desktop-save-mode 1) at the end of my init file.
I do get similar error, but I am not sure I am doing it the way you do – I don’t know how this mode should work and get confused where I should save the desktop file.

One thing that you might like to do is to put desktop-save-mode in after-init-hook after Org-roam.
Like this:

(add-hook 'after-init-hook 'desktop-save-mode)

Or with using use-package, perhaps like this (?)

(use-package org-roam
... all the code for org-roam)

(use-package desktop-save-mode
  :hook
  (after-init . desktop-save-mode)
  ... other config ...)

Or maybe yon can look to use the after option (directive?) to make it explicit to load desktop-save-mode after org-roam.

This way, at least I could avoid the long loading time.

I suspect one of the reasons why you have the loading issue is, by putting (desktop-save-mode 1) regardless of where in init file it is, you are enabling destop-save-mode before org-mode has been enabled. This is because it looks like you are enabling org-roam-mode after init file has been loaded in this (after-init . org-roam-mode).