1

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-handle-response()                                                                                      
  package-download-tar(js2-mode "20151027.456")                                                                  
  package-download-transaction((js2-mode))                                                                       
  package-install(js2-mode)                                                                                      
  use-package-ensure-elpa(js2-mode)                                                                              
  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*^@\$
  command-line()                                                                                                 
  normal-top-level()       

update

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 Oct 30 '15 at 18:02
  • It just saved my day in a similar situation, plus it's not off-topic, please keep this open – ggll Aug 20 '18 at 12:08
3

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.

| improve this answer | |
  • I did that, same thing. I already have (package-refresh-contents) in my .emacs. – Marcus Junius Brutus Oct 30 '15 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. – lunaryorn Oct 30 '15 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? – Marcus Junius Brutus Oct 30 '15 at 11:06
0

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

| improve this answer | |

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