This is the value of my package-archives variable:

C-h v package-archives
package-archives's value is (("melpa" . "http://melpa.org/packages/")
                         ("gnu" . "http://elpa.gnu.org/packages/"))

When I do a M-x list-packages I see package js2-mode but when I try to install it I get:

Error during download request: Not Found 

I also have the following in my .emacs :

 (use-package js2-mode
    :mode "\\.js\\'"
    :ensure t)

but when I visit a *.js buffer (with --init-debug) I get the following trace:

Debugger entered--Lisp error: (error "Error during download request: Not Found")                                 
   signal(error ("Error during download request: Not Found"))                                                     
   error("Error during download request:%s" " Not Found")                                                         
  package-download-tar(js2-mode "20151027.456")                                                                  
  use-package-handler/:ensure(js2-mode :ensure t (:mode (("\\.js\\'" . js2-mode)) :config (t) :defer t) nil)     
  use-package-process-keywords(js2-mode (:ensure t :mode (("\\.js\\'" . js2-mode)) :config (t) :defer t))        
  #[(name &rest args) "\306^H\235?\205\317^@    ;\203^R^@\307   !\202^S^@       ^Z\310  ^H\"\311\312^[^\^]\313^M$
  (use-package js2-mode :mode "\\.js\\'" :ensure t)                                                              
  (progn (require (quote package)) (setq package-enable-at-startup nil) (mapc (function (lambda (p) (add-to-list$
  eval-buffer(#<buffer  *load*> nil "/home/mperdikeas/.emacs" nil t)  ; Reading at buffer position 25263         
  load-with-code-conversion("/home/mperdikeas/.emacs" "/home/mperdikeas/.emacs" t t)                             
  load("~/.emacs" t t)                                                                                           
  #[0 "^H\205\262^@     \306=\203^Q^@\307^H\310Q\202;^@ \311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\$


See my "answer" below.

  • 4
    I'm voting to close this question as off-topic because the OP declared it to be a non-issue.
    – Drew
    Commented Oct 30, 2015 at 18:02
  • It just saved my day in a similar situation, plus it's not off-topic, please keep this open
    – ggll
    Commented Aug 20, 2018 at 12:08

2 Answers 2


TL;DR: M-x package-refresh-contents and try again :)

Emacs tells you that a package was not found on the remote archive. This is a symptom of an outdated local package archive cache: Your Emacs tries to fetch an outdated version of a package which does not exist on the server anymore because a never package is already available. You can refresh the local cache with M-x package-refresh-contents.

This is specifically an issue with MELPA, because unlike GNU ELPA it does not keep a backlog of older releases: Every update of a package deletes all older releases.

Hence you really need to make sure that your package archive cache is update if you are using MELPA.

  • I did that, same thing. I already have (package-refresh-contents) in my .emacs. Commented Oct 30, 2015 at 10:44
  • Are you sure that package-refresh-contents is actually called? The current version of JS2 Mode on MELPA is 20151029.1946. Try to refresh manually with M-x package-refresh-contents.
    – user227
    Commented Oct 30, 2015 at 10:47
  • Even after manually M-x package-refresh-contents this is what appears on the list-packages: js2-mode 20151027.456 available Improved JavaScript editing mode (and installing it fails again with the same message). I can access MELPA repo just fine with a browser, but could it be that the installation uses some other port as well that my firewall blocks? Commented Oct 30, 2015 at 11:06

Without changing anything, after a couple of hours it started working again. Some network vagary I suppose.

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