I'm trying to add packages via melpa in my init file. It was working, but today it stopped. To debug, I started with "emacs -q" and typed the following into my scratch buffer:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
The first two lines seem to work. The third line gives me an error and stack trace:
(wrong-type-argument arrayp nil)
package--add-to-archive-contents(nil "melpa")
package-read-archive-contents()
Is the error with my setup? Do I have the wrong url for melpa? I'm using GNU Emacs 24.5.1.
Although I'm not very familiar with it, I took a quick look at the package.el
code.
My guess is that your ~/.emacs.d/elpa/archives/melpa/archive-contents
file is "corrupted". As a result, package--add-to-archive-contents
is not finding an array
for an element it would expect to get from that file.
I believe the archive-contents
file is only a local cache. If you delete it, it will get rebuilt, and you should be all set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With