Doom-emacs: Could not find package X in recipe repositories

Created on 31 Mar 2020  ·  12Comments  ·  Source: hlissner/doom-emacs

After updating doom with doom upgrade, or its packages with doom update, I get errors like these:

Package error: (error Could not find package org-roam in recipe repositories: (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror))
Package error: (error Could not find package company-org-roam in recipe repositories: (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror))

And/or errors like these:

Cannot open load file: No such file or directory, org-roam
Cannot open load file: No such file or directory, org-superstar
bug common packages straight resolved

Most helpful comment

It's a known issue where your local melpa repo isn't being updated, so straight (our package manager) can't find new packages (like org-roam or org-superstar).

I'm working on a fix, but in the meantime you'll need to update your local melpa repo manually:

EDIT: This has been fixed in recent commits of Doom, but users coming from an older version may yet encounter this the first time they run doom upgrade, so this fix is still applicable to you:

# Update MELPA
cd ~/.emacs.d/.local/straight/repos/melpa
git pull

# Clear straight's cache
rm -f ~/.emacs.d/.local/straight/build-cache.el
doom sync

All 12 comments

Me too.

It's a known issue where your local melpa repo isn't being updated, so straight (our package manager) can't find new packages (like org-roam or org-superstar).

I'm working on a fix, but in the meantime you'll need to update your local melpa repo manually:

EDIT: This has been fixed in recent commits of Doom, but users coming from an older version may yet encounter this the first time they run doom upgrade, so this fix is still applicable to you:

# Update MELPA
cd ~/.emacs.d/.local/straight/repos/melpa
git pull

# Clear straight's cache
rm -f ~/.emacs.d/.local/straight/build-cache.el
doom sync

I've encountered this same issue, and the recommended workaround fails like so:

$ doom sync
Building straight...
Building straight...done
Building use-package...
Building use-package → Building bind-key...
Building use-package → Building bind-key...done
Building use-package...
Building use-package...done
> Synchronizing your config with Doom Emacs...
  > Regenerating envvars file at "~/.emacs.d/.local/env"
  - Scraping shell environment
    - Ignoring HOME=/Users/jcf
    - Ignoring GPG_TTY=/dev/ttys006
    - Ignoring PWD=/Users/jcf/.emacs.d/.local/straight/repos/melpa
    - Ignoring __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x2
    - Ignoring SSH_AUTH_SOCK=/Users/jcf/.gnupg/S.gpg-agent.ssh
    - Ignoring TERM=xterm-256color
    ✓ Successfully generated "~/.emacs.d/.local/env"
  > (Re)generating core autoloads...
    > Generating core autoloads...
    > Byte-compiling core autoloads file...
    ✓ Generated .local/autoloads.elc
  > Installing packages...
    → Cloning auto-minor-mode...
x There was an unexpected error:
  Type: doom-package-error
  Message:
    Error with packages
  Data:
    "auto-minor-mode"
    (error "Failed to run \"git\"; see buffer *straight-process*")
    "fatal: destination path '/Users/jcf/.emacs.d/.local/straight/repos/auto-minor-mode' already exists and is not an empty directory.
    "
  Straight output:
    fatal: destination path '/Users/jcf/.emacs.d/.local/straight/repos/auto-minor-mode' already exists and is not an empty directory.


Run the command again with the -d (or --debug) switch to enable debug
mode and (hopefully) generate a backtrace from this error:

  doom -d sync

If you file a bug report, please include it!
$ ls -alh /Users/jcf/.emacs.d/.local/straight/repos/auto-minor-mode
ls: /Users/jcf/.emacs.d/.local/straight/repos/auto-minor-mode: No such file or directory

Update: moving to the master branch (as opposed to develop) of straight.el in c96303830835ed49b6803a5288379891d6ab7cfc has fixed things for me.

For posterity and to avoid confusion, @jcf's issue is unrelated to this one (see #2937, which was resolved separately).

I had the same issue for shellcheck discovered it was also in my config (package.el), removed it and message has now gone...

As of 0e851ac bin/doom will update your recipe repos before installing/updating packages, which should resolve this issue. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!

Had the same problem. Just tried doom upgrade/update and got this

Type: error
  Message:
    error
  Data:
    "Could not find package org-superstar in recipe repositories: (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror)"

UPDATE: Worked after following these steps

@kawaiier Had the same issue org-superstar. Updating melpa manually as mentioned above fixed the issue

I have done the fix as mentioned above, but it always breaks again the next time I run doom upgrade

x There was an unexpected error:ate...
  Type: doom-package-error
  Message:
    Error with packages
  Data:
    "org-superstar"
    (error "Failed to run \"git\"; see buffer *straight-process*")
  Straight output:
    fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    HEAD

@harrisj I have the same issue :sweat_smile:

@harrisj @VitalyAnkh Try

git -C ~/.emacs.d pull
git -C ~/.emacs.d/.local/straight/repos/melpa pull
rm -rf ~/.emacs.d/.local/straight/repos/org-superstar
rm -f ~/.emacs.d/.local/straight/build-cache.el
doom sync

In case anyone happens upon this for org superstar in particular, @hlissner changed superstar to require (org +pretty) in init.el a few days ago (due to speed issues).

If the above package refreshing stuff doesn't work, you may need to add this flag.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rgrinberg picture rgrinberg  ·  3Comments

benjaminbauer picture benjaminbauer  ·  3Comments

idoo picture idoo  ·  3Comments

governorgoat picture governorgoat  ·  3Comments

bkchr picture bkchr  ·  3Comments